:root {
  --sidebar: #141a26;
  --sidebar-elevated: #192b53;
  --sidebar-text: #d8dce5;
  --sidebar-muted: #99a2b3;
  --canvas: #f5f6fa;
  --surface: #ffffff;
  --ink: #1f2937;
  --ink-strong: #111827;
  --muted: #687386;
  --muted-light: #929bab;
  --line: #eceef3;
  --line-soft: #f1f3f6;
  --primary: #2e5fdf;
  --primary-soft: #edf3ff;
  --green: #3c9a4e;
  --green-bright: #41a554;
  --red: #d83a3a;
  --amber: #c8890e;
  --radius-lg: 10px;
  --radius-md: 8px;
  --sidebar-width: 258px;
  --topbar-height: 76px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  display: flex;
  width: 100%;
  height: 100dvh;
  min-height: 640px;
  overflow: hidden;
}

/* -------------------------------------------------------------------------- */
/* Sidebar                                                                    */
/* -------------------------------------------------------------------------- */

.sidebar {
  position: relative;
  z-index: 20;
  display: flex;
  flex: 0 0 var(--sidebar-width);
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100%;
  overflow: hidden;
  background: var(--sidebar);
  color: var(--sidebar-text);
  transition: width 220ms cubic-bezier(0.2, 0.7, 0.3, 1),
    flex-basis 220ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.brand {
  display: flex;
  flex: 0 0 var(--topbar-height);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover .brand-title {
  color: #ffffff;
}

.brand-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: #f8f7f2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  min-width: 0;
  overflow: hidden;
  transition: opacity 140ms ease;
}

.brand-title {
  overflow: hidden;
  color: #f5f7fb;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 22px;
  text-overflow: ellipsis;
}

.brand-subtitle {
  margin-top: 1px;
  color: #8d96a8;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 16px;
}

.nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px 12px 8px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav-group {
  position: relative;
  margin: 0;
}

.nav-group + .nav-group {
  margin-top: 7px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  height: 42px;
  margin: 0;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 450;
  letter-spacing: 0.005em;
  line-height: 1;
  text-align: left;
  transition: background-color 140ms ease, color 140ms ease;
}

.nav-parent {
  color: #d6dae3;
  font-weight: 500;
}

.nav-parent:hover,
.nav-child:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
}

.nav-icon {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-right: 12px;
  place-items: center;
  color: #c3c9d5;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-chevron {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #7f899b;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: transform 170ms ease;
}

.nav-group:not(.is-open) .nav-chevron:not(.nav-chevron--right) {
  transform: rotate(-90deg);
}

.nav-group.is-open .nav-chevron--right {
  transform: rotate(90deg);
}

.nav-children {
  display: none;
  padding: 1px 0 1px;
}

.nav-group.is-open > .nav-children {
  display: block;
}

.nav-child {
  height: 42px;
  margin-right: 0;
  margin-left: 30px;
  width: calc(100% - 30px);
  padding: 0 12px 0 14px;
  color: #bec5d2;
  font-size: 14.5px;
  font-weight: 400;
  border-radius: 8px;
}

.nav-child.is-active {
  background: var(--sidebar-elevated);
  color: #f8faff;
  font-weight: 500;
}

.nav-child-chevron {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: #747f92;
}

.nav-child.is-active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: #4b7cf4;
  content: "";
  opacity: 0;
}

.sidebar-footer {
  flex: 0 0 auto;
  padding: 10px 12px 10px;
}

.collapse-btn {
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #2a3040;
  border-radius: 8px;
  background: transparent;
  color: #aeb6c6;
  cursor: pointer;
  font-size: 13.5px;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.collapse-btn:hover {
  border-color: #3b4458;
  background: rgba(255, 255, 255, 0.035);
  color: #eef1f6;
}

.collapse-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: transform 220ms ease;
}

/* Collapsed navigation ----------------------------------------------------- */

.app-shell.is-sidebar-collapsed .sidebar {
  flex-basis: 76px;
  width: 76px;
}

.app-shell.is-sidebar-collapsed
  .nav-group:has(> .nav-children .nav-child.is-active)
  > .nav-parent {
  background: var(--sidebar-elevated);
  color: #f8faff;
}

.app-shell.is-sidebar-collapsed .brand {
  justify-content: center;
  padding: 0;
}

.app-shell.is-sidebar-collapsed .brand-copy {
  display: none;
}

.app-shell.is-sidebar-collapsed .nav {
  padding-right: 10px;
  padding-left: 10px;
}

.app-shell.is-sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

.app-shell.is-sidebar-collapsed .nav-icon {
  margin-right: 0;
}

.app-shell.is-sidebar-collapsed .nav-label,
.app-shell.is-sidebar-collapsed .nav-chevron {
  display: none;
}

.app-shell.is-sidebar-collapsed .nav-parent[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.045);
}

.app-shell.is-sidebar-collapsed .nav-children {
  display: none !important;
}

.app-shell.is-sidebar-collapsed .nav-group + .nav-group {
  margin-top: 5px;
}

.app-shell.is-sidebar-collapsed .nav-parent {
  height: 44px;
}

.app-shell.is-sidebar-collapsed .sidebar-footer {
  padding-right: 10px;
  padding-left: 10px;
}

.app-shell.is-sidebar-collapsed .collapse-icon {
  transform: rotate(180deg);
}

.app-shell.is-sidebar-collapsed .collapse-text {
  display: none;
}

/* -------------------------------------------------------------------------- */
/* Workspace                                                                  */
/* -------------------------------------------------------------------------- */

.workspace {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  flex-direction: column;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 0 0 var(--topbar-height);
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid #eceef2;
  background: #fff;
}

.breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 24px;
}

.breadcrumb-root {
  color: #1d2735;
  white-space: nowrap;
}

.breadcrumb-separator {
  margin: 0 10px;
  color: #bdc4ce;
  font-weight: 400;
}

.breadcrumb-parent {
  overflow: hidden;
  color: #677286;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 140ms ease;
}

.breadcrumb-parent:hover {
  color: var(--primary);
}

.breadcrumb-current {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #1d2735;
  font-size: inherit;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.app-shell[data-view="warehouse"] .updated-at,
.app-shell[data-view="warehouse"] .btn-refresh {
  display: none;
}

.updated-at {
  margin-right: 10px;
  color: #6d7889;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.002em;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 17px;
  border: 1px solid #e3e6ec;
  border-radius: 7px;
  background: #fff;
  color: #273142;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 450;
  line-height: 1;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease,
    box-shadow 140ms ease;
}

.btn:hover {
  border-color: #cfd5df;
  background: #fafbfc;
}

.btn:disabled {
  opacity: 0.64;
  cursor: not-allowed;
}

.btn:focus-visible,
.collapse-btn:focus-visible,
.nav-item:focus-visible,
.dimension-tab:focus-visible,
.pager-btn:focus-visible,
.pager-page:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.45);
  outline-offset: 2px;
}

.btn-refresh-icon {
  display: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.btn.is-loading .btn-refresh-icon {
  display: block;
  animation: spin 850ms linear infinite;
}

.btn.is-loading {
  color: #657084;
  cursor: progress;
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  border-color: #2754c9;
  background: #2754c9;
  color: #fff;
}

/* Content ------------------------------------------------------------------ */

.content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 24px 40px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #d4d9e2 transparent;
  scrollbar-width: thin;
}

.content::-webkit-scrollbar {
  width: 8px;
}

.content::-webkit-scrollbar-track {
  background: transparent;
}

.content::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: #d4d9e2;
  background-clip: padding-box;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.kpi-card {
  display: flex;
  min-width: 0;
  height: 114px;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 20px 13px;
  border: 1px solid #edeff3;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(20, 28, 44, 0.025);
}

.kpi-label {
  overflow: hidden;
  color: #707b8d;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.002em;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-value {
  overflow: hidden;
  color: #1c2533;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 32px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-value.is-green {
  color: var(--green);
}

.kpi-value.is-red {
  color: var(--red);
}

.kpi-value.is-amber {
  color: var(--amber);
}

.kpi-foot {
  overflow: hidden;
  color: #778294;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-foot span {
  color: #4c586b;
  font-weight: 500;
}

.scope-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 14px 0 24px;
  padding: 8px 20px;
  color: #606b7d;
  font-size: 13.5px;
  line-height: 20px;
}

.scope-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}

.scope-left strong {
  color: #293446;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.scope-right {
  color: #778294;
  text-align: right;
}

.scope-right span {
  font-variant-numeric: tabular-nums;
}

/* Board -------------------------------------------------------------------- */

.board {
  min-width: 0;
  padding: 21px 16px 0;
  border: 1px solid #edeff3;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(20, 28, 44, 0.022);
}

.board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.board-title {
  margin: 0;
  color: #1b2533;
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 24px;
}

.board-subtitle {
  margin: 3px 0 0;
  color: #778294;
  font-size: 13px;
  font-weight: 400;
  line-height: 19px;
}

.dimension-tabs {
  display: flex;
  align-items: stretch;
  gap: 34px;
  height: 38px;
  margin-top: 18px;
  border-bottom: 0;
}

.dimension-tab {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: #515d70;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 450;
  line-height: 36px;
  white-space: nowrap;
  transition: color 140ms ease;
}

.dimension-tab:hover {
  color: #26354b;
}

.dimension-tab::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  content: "";
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity 150ms ease, transform 150ms ease;
}

.dimension-tab.is-active {
  color: var(--primary);
  font-weight: 550;
}

.dimension-tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Table -------------------------------------------------------------------- */

.table-wrap {
  position: relative;
  min-height: 240px;
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid #eff1f5;
  border-radius: 8px;
  background: #fff;
  scrollbar-color: #d6dbe3 transparent;
  scrollbar-width: thin;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
  background: #fff;
}

.table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 8px;
  background: #d6dbe3;
}

.data-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.data-table col.col-name {
  width: 27.2%;
}

.data-table col.col-number {
  width: 6.6%;
}

.data-table col.col-number-wide {
  width: 7.6%;
}

.data-table col.col-number-narrow {
  width: 5.8%;
}

.data-table col.col-number-regular {
  width: 6.5%;
}

.data-table col.col-rate {
  width: 12.4%;
}

.data-table col.col-grade {
  width: 7.5%;
}

.data-table thead th {
  height: 42px;
  padding: 0 10px;
  border-bottom: 1px solid #eff1f5;
  background: #f7f8fb;
  color: #697487;
  font-size: 13px;
  font-weight: 450;
  letter-spacing: 0.005em;
  line-height: 18px;
  text-align: left;
  white-space: nowrap;
}

.data-table thead th:first-child {
  padding-left: 16px;
}

.data-table thead th.num,
.data-table thead th.rate {
  text-align: right;
}

.data-table thead th.grade {
  padding-right: 16px;
  text-align: center;
}

.data-table tbody td {
  height: 48px;
  padding: 0 10px;
  border-bottom: 1px solid #f0f2f5;
  background: #fff;
  color: #222c3b;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 20px;
  vertical-align: middle;
  white-space: nowrap;
}

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

.data-table tbody tr:hover td {
  background: #fbfcfe;
}

.data-table tbody td:first-child {
  padding-left: 16px;
  overflow: hidden;
  color: #273243;
  font-size: 14px;
  text-overflow: ellipsis;
}

.data-table tbody td.num,
.data-table tbody td.rate {
  text-align: right;
}

.data-table tbody td.grade {
  padding-right: 16px;
  text-align: center;
}

.data-table tbody td.is-emphasis {
  color: #1b2533;
  font-weight: 600;
}

.data-table tbody td.is-muted {
  color: #a5adba;
}

.rate-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.rate-bar {
  position: relative;
  display: block;
  flex: 1 1 100px;
  width: auto;
  min-width: 44px;
  max-width: 100px;
  height: 6px;
  border-radius: 999px;
  background: #eef1f6;
}

.rate-fill {
  display: block;
  width: 1%;
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  background: #ccdaf0;
}

.rate-bar.is-alert {
  background: #eef1f6;
}

.rate-bar.is-alert .rate-fill {
  background: #f2b94b;
}

.rate-dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f0a51f;
  box-shadow: 0 0 0 1px rgba(240, 165, 31, 0.08);
  transform: translate(-0.5px, -50%);
}

.rate-value {
  flex: 0 0 auto;
  min-width: 38px;
  color: #273243;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.grade-pill {
  display: inline-flex;
  height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 450;
  line-height: 1;
}

.grade-pill.is-normal {
  background: #eef8ef;
  color: #45964f;
}

.grade-pill.is-watch {
  background: #fdf3e4;
  color: #b47b16;
}

.table-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.82);
  color: #748094;
  font-size: 13px;
  backdrop-filter: blur(1px);
}

.table-wrap.is-loading .table-loading {
  display: flex;
}

.loading-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid #dce2ec;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

.table-footer {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 2px 14px;
}

.table-total {
  color: #7b8597;
  font-size: 13px;
}

.table-total strong {
  color: #4b586b;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pager-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pager-btn,
.pager-page {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e5e8ee;
  border-radius: 6px;
  background: #fff;
  color: #5a6679;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.pager-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.pager-btn:hover:not(:disabled),
.pager-page:hover {
  border-color: #cad2df;
  color: #253249;
}

.pager-btn:disabled {
  color: #c4cbd5;
  cursor: not-allowed;
}

.pager-page.is-current {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Warehouse settings pages                                                   */
/* -------------------------------------------------------------------------- */

.warehouse-page {
  min-width: 0;
}

.settings-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 2px 18px;
}

.settings-heading-copy {
  min-width: 0;
}

.settings-title {
  margin: 0;
  color: #172132;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 30px;
}

.settings-subtitle {
  margin: 6px 0 0;
  color: #7b8596;
  font-size: 13.5px;
  line-height: 21px;
}

.btn-page-action {
  height: 36px;
  flex: 0 0 auto;
  gap: 7px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
}

.btn-inline-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.settings-card {
  overflow: hidden;
  border: 1px solid #edeff3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 28, 44, 0.022);
}

.settings-card-toolbar {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f2f5;
}

.settings-card-title-group h3 {
  margin: 0;
  color: #202a39;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 22px;
}

.settings-card-title-group p {
  margin: 3px 0 0;
  color: #8a94a4;
  font-size: 12.5px;
  line-height: 18px;
}

.settings-card-title-group strong {
  color: #526074;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.table-search {
  display: flex;
  width: 300px;
  max-width: 100%;
  height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #e3e7ed;
  border-radius: 8px;
  background: #fafbfc;
  transition: border-color 140ms ease, background-color 140ms ease,
    box-shadow 140ms ease;
}

.table-search:focus-within {
  border-color: #9db4eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 95, 223, 0.08);
}

.table-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: #8d97a7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.table-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #2b3544;
  font-size: 13px;
}

.table-search input::placeholder {
  color: #a0a8b5;
}

.table-search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.warehouse-table-wrap {
  position: relative;
  overflow-x: auto;
  scrollbar-color: #d6dbe3 transparent;
  scrollbar-width: thin;
}

.warehouse-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.warehouse-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 8px;
  background: #d6dbe3;
}

.warehouse-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.warehouse-table col.wh-col-name {
  width: 15.5%;
}

.warehouse-table col.wh-col-address {
  width: 17%;
}

.warehouse-table col.wh-col-type {
  width: 6.5%;
}

.warehouse-table col.wh-col-company {
  width: 16%;
}

.warehouse-table col.wh-col-carriers {
  width: 14%;
}

.warehouse-table col.wh-col-area {
  width: 7.5%;
}

.warehouse-table col.wh-col-contact {
  width: 12.5%;
}

.warehouse-table col.wh-col-manage {
  width: 11%;
}

.warehouse-table thead th {
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid #eff1f5;
  background: #f7f8fb;
  color: #697487;
  font-size: 12.5px;
  font-weight: 450;
  text-align: left;
  white-space: nowrap;
}

.warehouse-table thead th.num {
  text-align: right;
}

.warehouse-table thead th.management {
  padding-right: 10px;
  padding-left: 10px;
  text-align: center;
}

.warehouse-table tbody td {
  height: 66px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f3f6;
  background: #fff;
  color: #2c3645;
  font-size: 13px;
  line-height: 19px;
  vertical-align: middle;
}

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

.warehouse-table tbody tr:hover td {
  background: #fbfcfe;
}

.warehouse-table tbody td.num {
  color: #263243;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.warehouse-table tbody td.management {
  padding-right: 10px;
  padding-left: 10px;
  text-align: center;
}

.warehouse-name-cell .cell-primary,
.warehouse-address-cell .cell-primary,
.warehouse-company-cell .cell-primary {
  display: block;
  overflow: hidden;
  color: #253041;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-address-cell .cell-primary {
  color: #4c596c;
  font-weight: 400;
}

.warehouse-company-cell .cell-primary {
  color: #4b5769;
  font-weight: 400;
}

.cell-secondary {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #8d97a7;
  font-size: 11.5px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-muted {
  color: #a5adba;
}

.warehouse-type-pill {
  display: inline-flex;
  height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 450;
  line-height: 1;
  white-space: nowrap;
}

.warehouse-type-pill.is-direct {
  background: #eef3ff;
  color: #3563cd;
}

.warehouse-type-pill.is-partner {
  background: #eef8f4;
  color: #2f8b6f;
}

.table-carrier-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.table-carrier-tag {
  display: inline-flex;
  height: 23px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid #e9edf4;
  border-radius: 5px;
  background: #f8f9fc;
  color: #5b6779;
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
}

.table-carrier-more {
  color: #8b95a5;
  font-size: 11.5px;
}

.warehouse-contact-cell {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.table-contact-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: #586478;
  font-size: 11.5px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-contact-row > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-contact-badge {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #edf3ff;
  color: #4b70c9;
  font-size: 10px;
}

.table-contact-badge.is-business {
  background: #f2f0fc;
  color: #7862b7;
}

.warehouse-empty {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  text-align: center;
}

.warehouse-empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #f3f6fa;
  color: #96a0b0;
}

.warehouse-empty-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.warehouse-empty p {
  margin: 12px 0 0;
  color: #4f5b6e;
  font-size: 13.5px;
  font-weight: 500;
}

.warehouse-empty span {
  margin-top: 4px;
  color: #97a0ae;
  font-size: 12px;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.manage-trigger,
.detail-trigger {
  display: inline-flex;
  height: 28px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #5d6a7e;
  cursor: pointer;
  font-size: 12.5px;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease,
    color 140ms ease;
}

.manage-trigger:hover,
.manage-trigger[aria-expanded="true"],
.detail-trigger:hover {
  border-color: #e7ebf2;
  background: #f4f7fb;
  color: #2e5fdf;
}

.manage-trigger:focus-visible,
.detail-trigger:focus-visible,
.manage-menu-item:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.45);
  outline-offset: 1px;
}

.manage-trigger svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: transform 150ms ease;
}

.manage-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.manage-menu {
  position: fixed;
  z-index: 75;
  min-width: 148px;
  padding: 5px;
  border: 1px solid #e4e8ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(18, 29, 48, 0.16);
}

.manage-menu-item {
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3f4b5e;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  transition: background-color 120ms ease, color 120ms ease;
}

.manage-menu-item:hover {
  background: #f5f7fb;
}

.manage-menu-item svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.manage-menu-item.is-danger {
  color: #c44747;
}

.manage-menu-item.is-danger:hover {
  background: #fdf3f3;
  color: #b43b3b;
}

/* Warehouse detail --------------------------------------------------------- */

.detail-page-heading {
  align-items: flex-start;
}

.detail-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-title-line .settings-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-title-line .warehouse-type-pill {
  height: 23px;
  flex: 0 0 auto;
  padding: 0 9px;
  font-size: 11.5px;
}

.detail-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding-top: 30px;
}

.warehouse-detail-layout {
  display: grid;
  width: 100%;
  max-width: 1120px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  align-items: start;
  gap: 16px;
  margin: 0 auto;
  padding-bottom: 12px;
}

.detail-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.detail-card {
  min-width: 0;
}

.detail-card-head {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f2f5;
}

.detail-card-head h3 {
  margin: 0;
  color: #202b3b;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 22px;
}

.detail-card-count,
.detail-photo-count {
  display: inline-flex;
  height: 23px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #f3f5f8;
  color: #7c8798;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 4px 20px 12px;
}

.detail-info-item {
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid #f3f5f8;
}

.detail-info-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.detail-info-item.detail-span-2 {
  grid-column: 1 / -1;
}

.detail-info-item dt {
  margin: 0 0 4px;
  color: #8c96a6;
  font-size: 12px;
  line-height: 18px;
}

.detail-info-item dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #2d384a;
  font-size: 13.5px;
  line-height: 21px;
}

.detail-location-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #55705e;
}

.detail-location-text::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #57a36a;
  content: "";
}

.detail-muted {
  color: #a0a8b5 !important;
}

.detail-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px;
}

.detail-contact-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #fafbfd;
}

.detail-contact-role {
  display: inline-flex;
  width: fit-content;
  height: 20px;
  align-items: center;
  padding: 0 6px;
  border-radius: 4px;
  background: #edf3ff;
  color: #4f71c9;
  font-size: 10.5px;
  line-height: 1;
}

.detail-contact-role.is-business {
  background: #f2f0fc;
  color: #7660b4;
}

.detail-contact-card strong {
  overflow: hidden;
  color: #263244;
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-contact-phone {
  color: #607087;
  font-size: 12.5px;
  line-height: 19px;
  text-decoration: none;
}

.detail-contact-phone:hover {
  color: var(--primary);
}

.detail-carrier-groups {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 16px 20px;
}

.detail-carrier-group h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: #7b8698;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.detail-carrier-group h4 span {
  color: #a1a9b5;
  font-size: 11px;
  font-weight: 400;
}

.detail-carrier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-carrier-tag {
  display: inline-flex;
  height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #e8edf5;
  border-radius: 6px;
  background: #f7f9fc;
  color: #536178;
  font-size: 12px;
  white-space: nowrap;
}

.detail-carrier-empty {
  color: #a0a8b5;
  font-size: 12.5px;
}

.detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 20px 0;
}

.detail-photo-button {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e8ebf1;
  border-radius: 8px;
  background: #f2f4f7;
  cursor: zoom-in;
}

.detail-photo-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-photo-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  height: 23px;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border-radius: 5px;
  background: rgba(15, 24, 38, 0.68);
  color: #fff;
  font-size: 10.5px;
  line-height: 1;
  opacity: 0;
  transition: opacity 140ms ease;
  backdrop-filter: blur(3px);
}

.detail-photo-zoom svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.detail-photo-button:hover .detail-photo-zoom,
.detail-photo-button:focus-visible .detail-photo-zoom {
  opacity: 1;
}

.detail-photo-placeholder {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px dashed #d6deea;
  border-radius: 8px;
  background: #fafbfd;
  color: #7d8899;
}

.detail-photo-placeholder svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: #8291a5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.detail-photo-placeholder strong {
  display: block;
  color: #4b596d;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.detail-photo-placeholder span {
  display: block;
  margin-top: 2px;
  color: #97a0ae;
  font-size: 11.5px;
  line-height: 17px;
}

.detail-photo-empty {
  grid-column: 1 / -1;
  padding: 24px 0;
  color: #9aa3b1;
  font-size: 12.5px;
  text-align: center;
}

.detail-photo-note {
  margin: 10px 20px 16px;
  color: #9aa3b1;
  font-size: 11.5px;
  line-height: 17px;
}

/* Warehouse form ----------------------------------------------------------- */

.form-page-heading {
  width: 100%;
  max-width: 1120px;
  align-items: flex-start;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #667286;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 20px;
  transition: color 140ms ease;
}

.back-link:hover {
  color: var(--primary);
}

.back-link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.warehouse-form {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-bottom: 12px;
}

.form-card {
  overflow: visible;
  border: 1px solid #edeff3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 28, 44, 0.022);
}

.form-section {
  padding: 22px 24px;
  border-bottom: 1px solid #f0f2f5;
}

.form-section:last-child {
  border-bottom: 0;
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.form-section-head h3 {
  margin: 0;
  color: #202b3b;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 22px;
}

.form-section-head p {
  margin: 3px 0 0;
  color: #8b95a5;
  font-size: 12.5px;
  line-height: 19px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.form-span-2 {
  grid-column: 1 / -1;
}

.form-field {
  min-width: 0;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: #465267;
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
}

.field-label em,
.contact-card legend em,
.form-actions-note em {
  margin-left: 2px;
  color: #d94848;
  font-style: normal;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
}

.field-label-row .field-label {
  margin-bottom: 0;
}

.field-label-note {
  color: #98a1b0;
  font-size: 12px;
  line-height: 19px;
}

.field-control {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  outline: 0;
  background: #fff;
  color: #263143;
  font-size: 13.5px;
  line-height: 20px;
  transition: border-color 140ms ease, box-shadow 140ms ease,
    background-color 140ms ease;
}

.field-control::placeholder {
  color: #a4acb9;
}

.field-control:hover {
  border-color: #d4dae3;
}

.field-control:focus {
  border-color: #4d73de;
  box-shadow: 0 0 0 3px rgba(46, 95, 223, 0.09);
}

select.field-control {
  appearance: none;
  padding-right: 34px;
  cursor: pointer;
}

select.field-control:disabled {
  background: #f8f9fb;
  color: #a5adba;
  cursor: not-allowed;
}

.select-wrap {
  position: relative;
  min-width: 0;
}

.select-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #8994a4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  pointer-events: none;
  transform: translateY(-50%);
}

.select-wrap:has(select:disabled) .select-chevron {
  color: #c0c7d1;
}

.unit-input {
  position: relative;
}

.unit-input .field-control {
  padding-right: 45px;
}

.unit-input > span {
  position: absolute;
  top: 50%;
  right: 13px;
  color: #7b8595;
  font-size: 12.5px;
  pointer-events: none;
  transform: translateY(-50%);
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.address-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.address-row .field-control {
  flex: 1 1 auto;
  min-width: 0;
}

.btn-locate {
  height: 40px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.btn-locate:disabled {
  opacity: 0.68;
  cursor: wait;
}

.location-status {
  display: flex;
  min-height: 17px;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: #929ba9;
  font-size: 12px;
  line-height: 17px;
}

.location-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #c5ccd6;
}

.location-status.is-active {
  color: #3f8f58;
}

.location-status.is-active .location-dot {
  background: #45a260;
  box-shadow: 0 0 0 3px rgba(69, 162, 96, 0.1);
}

.field-hint {
  margin: 7px 0 0;
  color: #929baa;
  font-size: 12px;
  line-height: 17px;
}

.field-error {
  min-height: 17px;
  margin: 5px 0 0;
  color: #d64545;
  font-size: 12px;
  line-height: 17px;
}

.field-error:empty {
  min-height: 0;
  margin: 0;
}

.form-field.is-invalid .field-control,
.contact-card.is-invalid .field-control {
  border-color: #e48484;
  background: #fffafa;
}

.form-field.is-invalid .field-control:focus,
.contact-card.is-invalid .field-control:focus {
  border-color: #d95f5f;
  box-shadow: 0 0 0 3px rgba(217, 95, 95, 0.09);
}

.contact-grid {
  gap: 18px;
}

.contact-card {
  min-width: 0;
  margin: 0;
  padding: 14px 16px 12px;
  border: 1px solid #e9edf2;
  border-radius: 8px;
  background: #fafbfd;
}

.contact-card legend {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  color: #465267;
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
}

.contact-card-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: #7e8898;
  font-size: 12px;
  line-height: 17px;
}

.mini-field .field-control {
  height: 38px;
  background: #fff;
  font-size: 13px;
}

.contact-card .field-error {
  margin-top: 7px;
}

.contact-card.is-invalid {
  border-color: #e8a2a2;
  background: #fffafa;
}

.carrier-picker {
  position: relative;
  width: 100%;
  max-width: 720px;
}

.carrier-trigger {
  display: flex;
  width: 100%;
  height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  background: #fff;
  color: #a0a8b5;
  cursor: pointer;
  font-size: 13.5px;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.carrier-trigger:hover {
  border-color: #d4dae3;
}

.carrier-trigger.has-value {
  color: #2b3546;
}

.carrier-trigger[aria-expanded="true"] {
  border-color: #4d73de;
  box-shadow: 0 0 0 3px rgba(46, 95, 223, 0.09);
}

.carrier-trigger .select-chevron {
  position: static;
  flex: 0 0 15px;
  transform: none;
  transition: transform 160ms ease;
}

.carrier-picker.is-open .carrier-trigger .select-chevron {
  transform: rotate(180deg);
}

.carrier-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  width: min(720px, 100%);
  max-height: 390px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e4e8ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(19, 31, 51, 0.14);
}

.carrier-search {
  display: flex;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #f0f2f5;
}

.carrier-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: #8e98a8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.carrier-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #2c3645;
  font-size: 13px;
}

.carrier-options-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 7px;
  scrollbar-color: #d6dbe3 transparent;
  scrollbar-width: thin;
}

.carrier-group + .carrier-group {
  margin-top: 12px;
}

.carrier-group h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #7d8798;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.carrier-group h4 em {
  color: #a4acb8;
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
}

.carrier-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px 10px;
  margin-top: 7px;
}

.carrier-option {
  display: flex;
  min-width: 0;
  min-height: 31px;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #465267;
  cursor: pointer;
  font-size: 13px;
  line-height: 19px;
  transition: background-color 120ms ease, color 120ms ease;
}

.carrier-option:hover {
  background: #f6f8fb;
}

.carrier-option:has(input:checked) {
  background: #f2f6ff;
  color: #2e5fdf;
}

.carrier-option input {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.carrier-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carrier-no-result {
  margin: 24px 0;
  color: #939dac;
  font-size: 12.5px;
  text-align: center;
}

.carrier-popover-foot {
  display: flex;
  min-height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-top: 1px solid #f0f2f5;
  color: #7d8798;
  font-size: 12px;
}

.carrier-popover-foot strong {
  color: #41506a;
  font-weight: 600;
}

.carrier-popover-foot button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #5175d7;
  cursor: pointer;
  font-size: 12px;
}

.carrier-popover-foot button:hover {
  color: #2e5fdf;
}

.form-field.is-invalid .carrier-trigger {
  border-color: #e48484;
  background: #fffafa;
}

.selected-carriers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.carrier-chip {
  display: inline-flex;
  height: 26px;
  align-items: center;
  gap: 4px;
  padding: 0 5px 0 9px;
  border: 1px solid #e4e9f2;
  border-radius: 6px;
  background: #f6f8fc;
  color: #4f5d72;
  font-size: 12px;
  line-height: 1;
}

.carrier-chip-remove {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #9aa3b2;
  cursor: pointer;
}

.carrier-chip-remove:hover {
  background: #e9eef7;
  color: #5e6c82;
}

.carrier-chip-remove svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.9;
}

.photo-counter {
  display: inline-flex;
  height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f3f5f8;
  color: #7d8797;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.photo-counter.is-ready {
  background: #eef8f0;
  color: #438c51;
}

.existing-photo-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px solid #e9edf3;
  border-radius: 7px;
  background: #f8f9fc;
  color: #6b778b;
  font-size: 12px;
  line-height: 18px;
}

.existing-photo-note strong {
  color: #44516a;
  font-weight: 600;
}

.existing-photo-note span + span {
  color: #959ead;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 12px;
  max-width: 920px;
}

.photo-add-tile {
  display: flex;
  min-height: 106px;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px dashed #cdd5e1;
  border-radius: 8px;
  background: #fafbfd;
  color: #828d9d;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease,
    color 140ms ease;
}

.photo-add-tile:hover,
.photo-grid.is-dragover .photo-add-tile {
  border-color: #7795df;
  background: #f4f7ff;
  color: #4168c5;
}

.photo-add-icon {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 3px;
  place-items: center;
  border-radius: 50%;
  background: #eef3ff;
  color: #5679d6;
}

.photo-add-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.photo-add-title {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 18px;
}

.photo-add-hint {
  color: #a1a9b5;
  font-size: 11px;
  line-height: 16px;
}

.photo-tile {
  position: relative;
  min-height: 106px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid #e8ebf1;
  border-radius: 8px;
  background: #f2f4f7;
}

.photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-cover-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  height: 21px;
  align-items: center;
  padding: 0 7px;
  border-radius: 5px;
  background: rgba(18, 27, 42, 0.7);
  color: #fff;
  font-size: 10.5px;
  line-height: 1;
  backdrop-filter: blur(3px);
}

.photo-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 27, 42, 0.66);
  color: #fff;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.photo-remove:hover {
  background: rgba(183, 51, 51, 0.9);
}

.photo-remove svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.9;
}

.photo-grid.is-dragover {
  outline: 2px solid rgba(46, 95, 223, 0.22);
  outline-offset: 3px;
  border-radius: 10px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 28, 44, 0.022);
}

.form-actions-note {
  margin: 0;
  color: #8c96a5;
  font-size: 12.5px;
  line-height: 19px;
}

.form-actions-buttons {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.btn-save,
.btn-cancel {
  height: 36px;
  padding: 0 20px;
}

/* Account & permissions --------------------------------------------------- */

.account-security-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #97a0af;
  font-size: 11.5px;
  line-height: 17px;
  white-space: nowrap;
}

.account-security-note svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.account-table-wrap {
  overflow-x: auto;
  scrollbar-color: #d6dbe3 transparent;
  scrollbar-width: thin;
}

.account-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.account-table col.ac-col-name {
  width: 20%;
}

.account-table col.ac-col-perms {
  width: 50%;
}

.account-table col.ac-col-date {
  width: 17%;
}

.account-table col.ac-col-actions {
  width: 13%;
}

.account-table thead th {
  height: 44px;
  padding: 0 18px;
  border-bottom: 1px solid #eff1f5;
  background: #f7f8fb;
  color: #697487;
  font-size: 12.5px;
  font-weight: 450;
  text-align: left;
  white-space: nowrap;
}

.account-table thead th.account-actions-head {
  text-align: right;
}

.account-table tbody td {
  min-height: 64px;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f3f6;
  background: #fff;
  color: #2c3645;
  font-size: 13px;
  line-height: 19px;
  vertical-align: middle;
}

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

.account-table tbody tr:hover td {
  background: #fbfcfe;
}

.account-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.account-name {
  overflow: hidden;
  color: #263142;
  font-size: 13.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-self-tag {
  display: inline-flex;
  height: 20px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 6px;
  border-radius: 4px;
  background: #edf8ef;
  color: #4b9559;
  font-size: 10px;
  line-height: 1;
}

.account-created-at {
  color: #7b8697;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.account-permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.account-permission-tag {
  display: inline-flex;
  height: 23px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid #e8edf4;
  border-radius: 5px;
  background: #f7f9fc;
  color: #5b687a;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.account-permission-empty {
  color: #a3abb8;
  font-size: 12px;
}

.account-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  white-space: nowrap;
}

.account-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #4d6fc9;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 20px;
  transition: color 140ms ease;
}

.account-text-button:hover {
  color: #2e5fdf;
}

.account-text-button.is-danger {
  color: #c44a4a;
}

.account-text-button.is-danger:hover {
  color: #ad3838;
}

.account-text-button:disabled {
  color: #c4cbd5;
  cursor: not-allowed;
}

.account-text-button:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.45);
  outline-offset: 2px;
}

.modal-icon.is-account {
  background: #eef3ff;
  color: #456ad0;
}

.modal-account {
  width: min(560px, 100%);
}

.account-form {
  margin-top: 18px;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-form .field-error {
  min-height: 17px;
}

.account-permissions-field {
  min-width: 0;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.account-permissions-field legend {
  padding: 0;
  color: #465267;
  font-size: 13px;
  font-weight: 500;
  line-height: 19px;
}

.account-permissions-field legend em {
  color: #d94848;
  font-style: normal;
}

.permission-hint {
  margin: 4px 0 10px;
  color: #98a1b0;
  font-size: 11.5px;
  line-height: 17px;
}

.account-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid #e8ecf2;
  border-radius: 8px;
  background: #fafbfd;
}

.permission-option {
  display: flex;
  min-width: 0;
  height: 29px;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  border-radius: 5px;
  color: #485468;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 19px;
  transition: background-color 120ms ease;
}

.permission-option:hover {
  background: #f2f5fa;
}

.permission-option:has(input:checked) {
  background: #eef3ff;
  color: #2e5fdf;
}

.permission-option input {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.account-form-error {
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid #f2d7d7;
  border-radius: 7px;
  background: #fff7f7;
  color: #c54848;
  font-size: 12px;
  line-height: 18px;
}

.account-form .modal-actions {
  margin-top: 20px;
}

.account-form .modal-actions .btn {
  min-width: 82px;
}

.account-permissions-field.is-invalid .account-permission-grid {
  border-color: #e6a1a1;
  background: #fffafa;
}

.no-access-page {
  display: grid;
  min-height: calc(100dvh - 140px);
  place-items: center;
  padding: 30px;
}

.no-access-card {
  width: min(430px, 100%);
  padding: 36px 32px;
  border: 1px solid #e9edf3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(20, 31, 50, 0.06);
  text-align: center;
}

.no-access-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 13px;
  background: #f2f5fa;
  color: #68788d;
}

.no-access-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.no-access-card h2 {
  margin: 0;
  color: #1e2938;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 28px;
}

.no-access-card p {
  margin: 8px 0 0;
  color: #7d899a;
  font-size: 13px;
  line-height: 21px;
}

.no-access-card .btn {
  margin-top: 20px;
  height: 36px;
}

/* Right-side warehouse drawer ---------------------------------------------- */

.drawer-backdrop {
  position: fixed;
  z-index: 110;
  inset: 0;
  background: rgba(14, 22, 35, 0.36);
  backdrop-filter: blur(2px);
  animation: fade-in 180ms ease;
}

.warehouse-drawer {
  position: fixed;
  z-index: 111;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(580px, calc(100vw - 44px));
  flex-direction: column;
  background: #f6f7fa;
  box-shadow: -24px 0 70px rgba(11, 20, 35, 0.22);
  animation: drawer-in 230ms cubic-bezier(0.2, 0.72, 0.3, 1);
}

.drawer-head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid #e9edf3;
  background: #fff;
}

.drawer-heading {
  min-width: 0;
}

.drawer-kicker {
  display: block;
  margin-bottom: 3px;
  color: #8a94a4;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 16px;
}

.drawer-title {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #182333;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.018em;
  line-height: 28px;
}

.drawer-company {
  margin: 5px 0 0;
  color: #7d8899;
  font-size: 12.5px;
  line-height: 19px;
}

.drawer-close {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  padding: 0;
  border: 1px solid #e6eaf0;
  border-radius: 7px;
  background: #fff;
  color: #7d8798;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease,
    border-color 140ms ease;
}

.drawer-close:hover {
  border-color: #d9dfe8;
  background: #f7f9fc;
  color: #405069;
}

.drawer-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.drawer-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #d5dae3 transparent;
  scrollbar-width: thin;
}

.drawer-body::-webkit-scrollbar {
  width: 7px;
}

.drawer-body::-webkit-scrollbar-thumb {
  border: 2px solid #f6f7fa;
  border-radius: 8px;
  background: #d5dae3;
}

.drawer-body .detail-card {
  flex: 0 0 auto;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.drawer-body .detail-card-head {
  min-height: 48px;
  padding: 12px 16px;
}

.drawer-body .detail-info-grid {
  padding: 2px 16px 10px;
}

.drawer-body .detail-info-item {
  padding: 10px 0;
}

.drawer-body .detail-contact-grid {
  padding: 14px 16px;
}

.drawer-body .detail-carrier-groups {
  padding: 14px 16px;
}

.drawer-body .detail-photo-grid {
  padding: 14px 16px 0;
}

.drawer-body .detail-photo-note {
  margin: 10px 16px 14px;
}

.drawer-foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid #e9edf3;
  background: #fff;
  box-shadow: 0 -8px 24px rgba(19, 31, 51, 0.04);
}

.drawer-foot-note {
  color: #969fad;
  font-size: 11.5px;
  line-height: 17px;
}

.drawer-foot-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

/* Image viewer ------------------------------------------------------------- */

.photo-viewer {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 76px 62px;
  background: rgba(6, 11, 18, 0.93);
  animation: fade-in 160ms ease;
}

.photo-viewer-top {
  position: absolute;
  top: 18px;
  right: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #dbe3ee;
  font-size: 12.5px;
  line-height: 20px;
}

.photo-viewer-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #e9eef6;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.photo-viewer-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.photo-viewer-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.9;
}

.photo-viewer > img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.photo-viewer-nav {
  position: absolute;
  top: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5fa;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 140ms ease;
}

.photo-viewer-nav:hover {
  background: rgba(255, 255, 255, 0.17);
}

.photo-viewer-nav.is-prev {
  left: 22px;
}

.photo-viewer-nav.is-next {
  right: 22px;
}

.photo-viewer-nav.is-prev svg {
  transform: rotate(180deg);
}

.photo-viewer-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.photo-viewer-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  color: #aab5c5;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
}

@keyframes drawer-in {
  from {
    opacity: 0.45;
    transform: translateX(34px);
  }
}

/* -------------------------------------------------------------------------- */
/* Toast + modal                                                              */
/* -------------------------------------------------------------------------- */

.toast-region {
  position: fixed;
  z-index: 80;
  top: 88px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 420px;
  padding: 10px 16px;
  border: 1px solid #e4e8ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 28px rgba(23, 34, 52, 0.1);
  color: #3d495c;
  font-size: 13px;
  line-height: 18px;
  opacity: 0;
  transform: translateY(-6px);
  animation: toast-in 180ms ease forwards;
}

.toast.is-leaving {
  animation: toast-out 160ms ease forwards;
}

.toast::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #5d8bef;
  content: "";
}

.toast.is-error::before {
  background: var(--red);
}

.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 18, 28, 0.36);
  backdrop-filter: blur(2px);
  animation: fade-in 160ms ease;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(428px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(11, 20, 36, 0.24);
  animation: modal-in 200ms cubic-bezier(0.2, 0.75, 0.3, 1);
}

.modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: #fff6e8;
  color: #b67b16;
}

.modal-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.modal-icon.is-danger {
  background: #fdf2f2;
  color: #c34646;
}

.modal-danger p strong {
  color: #b93e3e;
  font-weight: 600;
}

.btn-danger {
  border-color: #d84a4a;
  background: #d84a4a;
  color: #fff;
}

.btn-danger:hover {
  border-color: #c93d3d;
  background: #c93d3d;
  color: #fff;
}

.modal-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin: -2px -2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #97a0ae;
  cursor: pointer;
}

.modal-close:hover {
  background: #f4f6f9;
  color: #5f6b7e;
}

.modal-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.modal h2 {
  margin: 16px 0 0;
  color: #182231;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 24px;
}

.modal p {
  margin: 7px 0 0;
  color: #707b8c;
  font-size: 13.5px;
  line-height: 21px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.modal-actions .btn {
  min-width: 74px;
}

/* -------------------------------------------------------------------------- */
/* Motion + responsive                                                        */
/* -------------------------------------------------------------------------- */

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

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-5px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

@media (max-width: 1420px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .app-shell:not(.is-sidebar-expanded) .sidebar {
    flex-basis: 76px;
    width: 76px;
  }

  .app-shell:not(.is-sidebar-expanded) .brand {
    justify-content: center;
    padding: 0;
  }

  .app-shell:not(.is-sidebar-expanded) .brand-copy,
  .app-shell:not(.is-sidebar-expanded) .nav-label,
  .app-shell:not(.is-sidebar-expanded) .nav-chevron,
  .app-shell:not(.is-sidebar-expanded) .collapse-text {
    display: none;
  }

  .app-shell:not(.is-sidebar-expanded) .nav {
    padding-right: 10px;
    padding-left: 10px;
  }

  .app-shell:not(.is-sidebar-expanded) .nav-item {
    justify-content: center;
    padding: 0;
  }

  .app-shell:not(.is-sidebar-expanded) .nav-icon {
    margin-right: 0;
  }

  .app-shell:not(.is-sidebar-expanded) .nav-children {
    display: none !important;
  }

  .app-shell:not(.is-sidebar-expanded) .sidebar-footer {
    padding-right: 10px;
    padding-left: 10px;
  }

  .app-shell:not(.is-sidebar-expanded) .collapse-icon {
    transform: rotate(180deg);
  }

  .topbar {
    padding: 0 20px;
  }

  .content {
    padding-right: 20px;
    padding-left: 20px;
  }

  .scope-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
  }

  .scope-right {
    text-align: left;
  }

  .board {
    padding-right: 18px;
    padding-left: 18px;
  }
}

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

  .kpi-card {
    height: 112px;
  }

  .kpi-card:last-child {
    grid-column: span 2;
  }

  .updated-at {
    display: none;
  }

  .breadcrumb {
    font-size: 15.5px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .btn {
    padding: 0 14px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    min-height: 560px;
  }

  .app-shell:not(.is-sidebar-expanded) .sidebar {
    flex-basis: 64px;
    width: 64px;
  }

  .app-shell.is-sidebar-collapsed .sidebar {
    flex-basis: 64px;
    width: 64px;
  }

  .brand {
    flex-basis: 64px;
  }

  .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .topbar {
    height: 64px;
    flex-basis: 64px;
    padding: 0 14px;
  }

  .content {
    padding: 10px 14px 28px;
  }

  .kpi-grid {
    gap: 10px;
  }

  .kpi-card {
    height: 104px;
    padding: 10px 14px 11px;
  }

  .kpi-value {
    font-size: 24px;
    line-height: 30px;
  }

  .kpi-label,
  .kpi-foot {
    font-size: 12px;
  }

  .scope-note {
    margin: 10px 0 18px;
    padding: 0;
  }

  .board {
    padding: 16px 14px 0;
  }

  .board-title {
    font-size: 16px;
  }

  .board-subtitle {
    font-size: 12px;
    line-height: 18px;
  }

  .dimension-tabs {
    gap: 22px;
    overflow-x: auto;
  }

  .dimension-tab {
    font-size: 13px;
  }

  .table-footer {
    min-height: 56px;
  }

  .breadcrumb-root,
  .breadcrumb-separator {
    display: none;
  }
}

@media (max-width: 1180px) {
  .table-search {
    width: 260px;
  }
}

@media (max-width: 900px) {
  .settings-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
  }

  .warehouse-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-heading-actions {
    padding-top: 0;
  }

  .settings-title {
    font-size: 20px;
    line-height: 28px;
  }

  .settings-subtitle {
    font-size: 13px;
    line-height: 20px;
  }

  .form-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-span-2 {
    grid-column: auto;
  }

  .form-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .form-actions-buttons {
    align-self: flex-end;
  }
}

@media (max-width: 680px) {
  .breadcrumb-parent {
    display: none;
  }

  .settings-heading {
    padding: 4px 0 14px;
  }

  .btn-page-action {
    width: 100%;
  }

  .settings-card-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .table-search {
    width: 100%;
  }

  .form-page-heading {
    padding-bottom: 14px;
  }

  .warehouse-form {
    max-width: none;
  }

  .form-section {
    padding: 18px 14px;
  }

  .form-section-head {
    margin-bottom: 14px;
  }

  .detail-info-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 14px;
    padding-left: 14px;
  }

  .detail-info-item.detail-span-2 {
    grid-column: auto;
  }

  .detail-contact-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .detail-carrier-groups {
    padding: 14px;
  }

  .detail-photo-grid {
    padding: 12px 14px 0;
  }

  .detail-photo-note {
    margin-right: 14px;
    margin-left: 14px;
  }

  .detail-card-head {
    padding: 12px 14px;
  }

  .detail-heading-actions {
    width: 100%;
  }

  .detail-heading-actions .btn {
    width: 100%;
  }

  .region-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .address-row {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-locate {
    width: 100%;
  }

  .contact-card-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .carrier-popover {
    width: 100%;
    max-height: 360px;
  }

  .carrier-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .photo-add-tile {
    min-height: 96px;
  }

  .form-actions {
    position: static;
    padding: 12px;
  }

  .form-actions-buttons {
    width: 100%;
    align-self: stretch;
  }

  .form-actions-buttons .btn {
    flex: 1;
  }

  .warehouse-drawer {
    width: 100%;
    max-width: none;
  }

  .drawer-head {
    padding: 16px 14px;
  }

  .drawer-title {
    font-size: 18px;
    line-height: 26px;
  }

  .drawer-body {
    padding: 10px 10px 18px;
  }

  .drawer-body .detail-info-grid {
    padding-right: 14px;
    padding-left: 14px;
  }

  .drawer-body .detail-contact-grid,
  .drawer-body .detail-carrier-groups {
    padding: 12px 14px;
  }

  .drawer-body .detail-photo-grid {
    padding: 12px 14px 0;
  }

  .drawer-foot {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }

  .drawer-foot-note {
    display: none;
  }

  .drawer-foot-actions {
    width: 100%;
  }

  .drawer-foot-actions .btn {
    flex: 1;
  }

  .account-security-note {
    display: none;
  }

  .account-form-grid,
  .account-permission-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-table thead th,
  .account-table tbody td {
    padding-right: 12px;
    padding-left: 12px;
  }

  .photo-viewer {
    padding: 58px 12px 48px;
  }

  .photo-viewer-top {
    top: 12px;
    right: 14px;
    left: 14px;
  }

  .photo-viewer-nav {
    width: 34px;
    height: 34px;
  }

  .photo-viewer-nav.is-prev {
    left: 8px;
  }

  .photo-viewer-nav.is-next {
    right: 8px;
  }

  .photo-viewer-nav svg {
    width: 17px;
    height: 17px;
  }
}

/* -------------------------------------------------------------------------- */
/* Mobile layout                                                              */
/* -------------------------------------------------------------------------- */

.topbar-leading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.mobile-menu-btn {
  display: none;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #e4e8ef;
  border-radius: 8px;
  background: #fff;
  color: #566477;
  cursor: pointer;
}

.mobile-menu-btn:focus {
  outline: none;
}

.mobile-menu-btn:focus-visible {
  outline: 2px solid #5b7dde;
  outline-offset: 2px;
}

.mobile-menu-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mobile-sidebar-backdrop {
  display: none;
}

.mobile-table-hint {
  display: none;
}

@media (max-width: 760px) {
  .app-shell {
    min-height: 560px;
  }

  .topbar {
    height: 64px;
    flex-basis: 64px;
    gap: 10px;
    padding: 0 12px;
  }

  .topbar-leading {
    flex: 1 1 auto;
    gap: 8px;
  }

  .mobile-menu-btn {
    display: grid;
  }

  .mobile-sidebar-backdrop:not([hidden]) {
    position: fixed;
    z-index: 124;
    inset: 0;
    display: block;
    background: rgba(10, 17, 28, 0.46);
    backdrop-filter: blur(2px);
  }

  .app-shell .sidebar,
  .app-shell.is-sidebar-collapsed .sidebar,
  .app-shell:not(.is-sidebar-expanded) .sidebar {
    position: fixed;
    z-index: 125;
    top: 0;
    bottom: 0;
    left: 0;
    width: 284px;
    flex-basis: 284px;
    visibility: hidden;
    box-shadow: 18px 0 52px rgba(9, 17, 30, 0.24);
    transform: translateX(-103%);
    transition: transform 220ms cubic-bezier(0.2, 0.72, 0.3, 1),
      visibility 220ms;
  }

  .app-shell.is-mobile-menu-open .sidebar {
    visibility: visible;
    transform: translateX(0);
  }

  .app-shell.is-mobile-menu-open .brand {
    justify-content: flex-start;
    padding: 0 18px;
  }

  .app-shell.is-mobile-menu-open .brand-copy {
    display: block;
  }

  .app-shell.is-mobile-menu-open .nav {
    padding: 24px 12px 8px;
  }

  .app-shell.is-mobile-menu-open .nav-item {
    justify-content: flex-start;
    padding: 0 11px;
  }

  .app-shell.is-mobile-menu-open .nav-icon {
    margin-right: 12px;
  }

  .app-shell.is-mobile-menu-open .nav-label,
  .app-shell.is-mobile-menu-open .nav-chevron,
  .app-shell.is-mobile-menu-open .collapse-text {
    display: block;
  }

  .app-shell.is-mobile-menu-open .nav-group.is-open > .nav-children {
    display: block !important;
  }

  .app-shell.is-mobile-menu-open .sidebar-footer {
    display: block;
    padding: 10px 12px 14px;
  }

  .app-shell.is-mobile-menu-open .collapse-icon {
    transform: none;
  }

  .breadcrumb-root,
  .breadcrumb-separator,
  .breadcrumb-parent {
    display: none;
  }

  .breadcrumb {
    flex: 1 1 auto;
    font-size: 15px;
  }

  .topbar-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .topbar-actions .btn {
    height: 32px;
    padding: 0 11px;
    font-size: 12.5px;
  }

  .content {
    padding: 8px 14px 28px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kpi-card {
    height: 105px;
    padding: 11px 13px 12px;
  }

  .kpi-card:last-child {
    grid-column: span 2;
  }

  .kpi-label,
  .kpi-foot {
    font-size: 12px;
  }

  .kpi-value {
    font-size: 25px;
    line-height: 30px;
  }

  .scope-note {
    margin: 10px 0 18px;
    padding: 0;
    gap: 4px;
    font-size: 12px;
  }

  .scope-left {
    gap: 14px;
  }

  .scope-right {
    line-height: 18px;
  }

  .board {
    padding: 16px 14px 0;
  }

  .board-title {
    font-size: 16px;
    line-height: 23px;
  }

  .board-subtitle {
    font-size: 12px;
    line-height: 18px;
  }

  .dimension-tabs {
    gap: 22px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .dimension-tabs::-webkit-scrollbar {
    display: none;
  }

  .dimension-tab {
    flex: 0 0 auto;
    font-size: 13px;
  }

  .mobile-table-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 7px;
    color: #9aa3b1;
    font-size: 11px;
    line-height: 17px;
  }

  .mobile-table-hint svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 1080px;
  }

  .data-table thead th:first-child,
  .data-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 5px 0 10px -8px rgba(25, 40, 64, 0.2);
  }

  .data-table thead th:first-child {
    z-index: 3;
    background: #f7f8fb;
  }

  .data-table tbody tr:hover td:first-child {
    background: #fbfcfe;
  }

  .table-footer {
    min-height: 56px;
  }

  /* Warehouse list becomes a card list on phones. */
  .warehouse-table-wrap {
    overflow: visible;
  }

  .warehouse-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  .warehouse-table colgroup,
  .warehouse-table thead {
    display: none;
  }

  .warehouse-table tbody {
    display: block;
  }

  .warehouse-table tbody tr {
    display: block;
    padding: 14px 14px 10px;
    border-bottom: 1px solid #f0f2f5;
  }

  .warehouse-table tbody tr:last-child {
    border-bottom: 0;
  }

  .warehouse-table tbody td {
    display: block;
    width: auto;
    height: auto;
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: #3d4a5d;
    font-size: 12.5px;
    line-height: 20px;
    text-align: left;
    white-space: normal;
  }

  .warehouse-table tbody td::before {
    display: inline;
    margin-right: 9px;
    color: #929baa;
    content: attr(data-label);
    font-size: 11.5px;
  }

  .warehouse-table tbody td:first-child {
    padding: 0 0 7px;
    font-size: 13.5px;
  }

  .warehouse-table tbody td:first-child::before {
    content: none;
  }

  .warehouse-table tbody td .cell-primary,
  .warehouse-table tbody td .cell-secondary {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
  }

  .warehouse-table tbody td.warehouse-address-cell .cell-primary,
  .warehouse-table tbody td.warehouse-company-cell .cell-primary {
    display: inline;
  }

  .warehouse-table tbody td.warehouse-address-cell .cell-secondary {
    display: block;
    padding-left: 0;
    color: #7c8797;
  }

  .warehouse-table tbody td.warehouse-contact-cell {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .warehouse-table tbody td.warehouse-contact-cell::before {
    float: left;
  }

  .warehouse-table tbody td.warehouse-contact-cell .table-contact-row {
    display: inline-flex;
    width: calc(100% - 62px);
    vertical-align: top;
  }

  .warehouse-table tbody td.num {
    text-align: left;
    white-space: normal;
  }

  .warehouse-table tbody td.management {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 7px;
    padding-top: 9px;
    border-top: 1px dashed #eef1f5;
  }

  .warehouse-table tbody td.management::before {
    color: #929baa;
    content: attr(data-label);
  }

  .warehouse-table tbody td.management .row-actions {
    margin-left: auto;
  }

  .warehouse-empty {
    min-height: 220px;
  }

  /* Account table becomes a card list on phones. */
  .account-table-wrap {
    overflow: visible;
  }

  .account-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  .account-table colgroup,
  .account-table thead {
    display: none;
  }

  .account-table tbody {
    display: block;
  }

  .account-table tbody tr {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f2f5;
  }

  .account-table tbody tr:last-child {
    border-bottom: 0;
  }

  .account-table tbody td {
    display: block;
    width: auto;
    height: auto;
    padding: 3px 0;
    border: 0;
    background: transparent;
    font-size: 12.5px;
    line-height: 20px;
  }

  .account-table tbody td::before {
    display: inline;
    margin-right: 9px;
    color: #929baa;
    content: attr(data-label);
    font-size: 11.5px;
  }

  .account-table tbody td:first-child {
    padding-bottom: 6px;
  }

  .account-table tbody td:first-child::before {
    content: none;
  }

  .account-table tbody td.account-created-at {
    color: #7b8697;
  }

  .account-table tbody td:last-child {
    padding-top: 8px;
  }

  .account-table tbody td:last-child::before {
    content: none;
  }

  .account-row-actions {
    justify-content: flex-start;
    gap: 16px;
  }

  .account-permission-tags {
    display: inline-flex;
    vertical-align: top;
  }

  .modal-backdrop {
    align-items: center;
    overflow-y: auto;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .modal {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .modal-actions {
    margin-top: 18px;
  }

  /* Keep settings content comfortable on small screens. */
  .settings-heading {
    gap: 12px;
    padding: 6px 0 14px;
  }

  .settings-title {
    font-size: 19px;
    line-height: 27px;
  }

  .settings-subtitle {
    font-size: 12.5px;
    line-height: 19px;
  }

  .btn-page-action {
    width: 100%;
  }

  .settings-card-toolbar {
    padding: 13px 14px;
  }

  .account-security-note {
    display: none;
  }

  .drawer-head {
    padding: 16px 14px;
  }

  .drawer-title {
    font-size: 18px;
    line-height: 26px;
  }
}

/* -------------------------------------------------------------------------- */
/* Overview                                                                   */
/* -------------------------------------------------------------------------- */

.app-shell[data-view="overview"] .updated-at {
  display: none;
}

.overview-view {
  padding: 10px 0 22px;
}

.overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 22px;
}

.overview-eyebrow {
  margin: 0 0 8px;
  color: #8b98ad;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 16px;
  text-transform: uppercase;
}

.overview-title {
  margin: 0;
  color: #1c2738;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 38px;
}

.overview-subtitle {
  max-width: 700px;
  margin: 7px 0 0;
  color: #7d8898;
  font-size: 12.5px;
  line-height: 21px;
}

.overview-updated {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: #9aa4b2;
  font-size: 10.5px;
  line-height: 16px;
  white-space: nowrap;
}

.overview-updated time {
  color: #657286;
  font-variant-numeric: tabular-nums;
}

.overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.overview-kpi {
  min-height: 121px;
  padding: 16px 17px 14px;
  border: 1px solid #eaedf2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(23, 38, 62, 0.025);
}

.overview-kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #6f7b8c;
  font-size: 12px;
  line-height: 18px;
}

.overview-kpi-label em {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 3px;
  background: #f6f8fb;
  color: #9da7b5;
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.03em;
  line-height: 14px;
}

.overview-kpi-value {
  display: block;
  min-height: 34px;
  margin: 9px 0 3px;
  color: #1d293b;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 34px;
  font-variant-numeric: tabular-nums;
}

.overview-kpi-value.is-green {
  color: #16884b;
}

.overview-kpi-value.is-red {
  color: #c54444;
}

.overview-kpi-foot {
  min-height: 17px;
  margin: 0;
  color: #9aa4b2;
  font-size: 10.5px;
  line-height: 17px;
}

.overview-kpi-foot span {
  color: #6f7b8c;
  font-variant-numeric: tabular-nums;
}

.overview-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 27px 0 12px;
}

.overview-section-head h2 {
  margin: 0;
  color: #293548;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 25px;
}

.overview-section-head p {
  margin: 4px 0 0;
  color: #9aa4b2;
  font-size: 11px;
  line-height: 17px;
}

.overview-section-head > span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid #e9edf3;
  border-radius: 999px;
  background: #fbfcfe;
  color: #8c98a8;
  font-size: 10.5px;
  line-height: 16px;
}

.overview-modules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.overview-module {
  display: flex;
  min-height: 174px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #eaedf2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(23, 38, 62, 0.025);
}

.overview-module-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 15px 15px 0;
}

.overview-module-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border-radius: 8px;
  background: #f1f5fd;
  color: #3d67c7;
}

.overview-module-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.overview-module h3 {
  margin: 0;
  color: #303d51;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 20px;
}

.overview-module-body {
  flex: 1;
  padding: 13px 15px 15px;
}

.overview-module-body.is-empty {
  min-height: 100px;
}

.overview-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 14px;
}

.overview-mini-grid div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.overview-mini-grid span {
  color: #9aa4b2;
  font-size: 10.5px;
  line-height: 16px;
}

.overview-mini-grid strong {
  min-height: 21px;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  line-height: 21px;
  font-variant-numeric: tabular-nums;
}

.overview-config-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overview-config-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #8590a0;
  font-size: 11.5px;
  line-height: 19px;
}

.overview-config-list strong {
  min-height: 19px;
  color: #445166;
  font-size: 12px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1180px) {
  .overview-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-modules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .overview-view {
    padding: 9px 0 18px;
  }

  .overview-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin: 5px 0 17px;
  }

  .overview-title {
    font-size: 23px;
    line-height: 32px;
  }

  .overview-subtitle {
    font-size: 12px;
    line-height: 19px;
  }

  .overview-updated {
    align-items: flex-start;
    flex-direction: row;
    gap: 6px;
    font-size: 10px;
  }

  .overview-kpis {
    gap: 9px;
  }

  .overview-kpi {
    min-height: 113px;
    padding: 13px 12px 12px;
    border-radius: 10px;
  }

  .overview-kpi-label {
    align-items: flex-start;
    font-size: 11.5px;
  }

  .overview-kpi-label em {
    font-size: 8px;
  }

  .overview-kpi-value {
    font-size: 23px;
    line-height: 30px;
    min-height: 30px;
    margin-top: 8px;
  }

  .overview-kpi-foot {
    font-size: 10px;
  }

  .overview-section-head {
    align-items: flex-start;
    margin: 22px 0 10px;
  }

  .overview-section-head h2 {
    font-size: 16px;
  }

  .overview-section-head p {
    display: none;
  }

  .overview-section-head > span {
    font-size: 9.5px;
  }

  .overview-modules {
    gap: 9px;
  }

  .overview-module {
    min-height: 153px;
    border-radius: 10px;
  }

  .overview-module-head {
    gap: 7px;
    padding: 12px 11px 0;
  }

  .overview-module-icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    border-radius: 7px;
  }

  .overview-module-icon svg {
    width: 14px;
    height: 14px;
  }

  .overview-module h3 {
    font-size: 12.5px;
    line-height: 18px;
  }

  .overview-module-body {
    padding: 11px 11px 12px;
  }

  .overview-module-body.is-empty {
    min-height: 87px;
  }

  .overview-mini-grid {
    gap: 8px 10px;
  }

  .overview-mini-grid span {
    font-size: 9.5px;
    line-height: 14px;
  }

  .overview-mini-grid strong {
    font-size: 13px;
    line-height: 18px;
    min-height: 18px;
  }

  .overview-config-list {
    gap: 6px;
  }

  .overview-config-list div {
    font-size: 10.5px;
    line-height: 17px;
  }

  .overview-config-list strong {
    font-size: 11px;
    line-height: 17px;
    min-height: 17px;
  }
}

@media (max-width: 340px) {
  .overview-modules {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------------------- */
/* Packaging basics                                                           */
/* -------------------------------------------------------------------------- */

.is-warning-text {
  color: #c54444 !important;
}

.packaging-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.packaging-summary-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-height: 48px;
  padding: 11px 15px;
  border: 1px solid #e9edf3;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 28, 44, 0.022);
}

.packaging-summary-item span {
  color: #7c8797;
  font-size: 12px;
  line-height: 18px;
}

.packaging-summary-item strong {
  margin-left: auto;
  color: #283548;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 24px;
  font-variant-numeric: tabular-nums;
}

.packaging-summary-item em {
  color: #9ca5b2;
  font-size: 10.5px;
  font-style: normal;
  line-height: 16px;
}

.packaging-summary-item.is-warning {
  border-color: #f1e3df;
  background: #fffbf9;
}

.packaging-summary-item.is-warning strong {
  color: #c54444;
}

.packaging-table-wrap {
  position: relative;
  overflow-x: auto;
  scrollbar-color: #d6dbe3 transparent;
  scrollbar-width: thin;
}

.packaging-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.packaging-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 8px;
  background: #d6dbe3;
}

.packaging-table {
  width: 100%;
  min-width: 1360px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.packaging-table col.pkg-col-image {
  width: 5%;
}

.packaging-table col.pkg-col-code {
  width: 8%;
}

.packaging-table col.pkg-col-name {
  width: 11%;
}

.packaging-table col.pkg-col-type {
  width: 8%;
}

.packaging-table col.pkg-col-size {
  width: 8%;
}

.packaging-table col.pkg-col-material {
  width: 9%;
}

.packaging-table col.pkg-col-purchase {
  width: 6%;
}

.packaging-table col.pkg-col-supplier {
  width: 9%;
}

.packaging-table col.pkg-col-owner {
  width: 9%;
}

.packaging-table col.pkg-col-owner-price {
  width: 7%;
}

.packaging-table col.pkg-col-stock {
  width: 6%;
}

.packaging-table col.pkg-col-warning {
  width: 6%;
}

.packaging-table col.pkg-col-manage {
  width: 8%;
}

.packaging-table thead th {
  position: relative;
  height: 44px;
  padding: 0 10px;
  border-bottom: 1px solid #eff1f5;
  background: #f7f8fb;
  color: #697487;
  font-size: 12px;
  font-weight: 450;
  text-align: left;
  white-space: nowrap;
}

.packaging-col-resizer {
  position: absolute;
  z-index: 2;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.packaging-col-resizer::after {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 3px;
  width: 1px;
  background: #e1e6ee;
  content: "";
  transition: background-color 120ms ease;
}

.packaging-col-resizer:hover::after,
.packaging-table.is-column-resizing .packaging-col-resizer::after {
  background: #5b7dde;
}

body.is-column-resizing {
  cursor: col-resize;
  user-select: none;
}

.packaging-table-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 9px 0 0;
  color: #9aa4b2;
  font-size: 10.5px;
  line-height: 16px;
}

.packaging-table-hint svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.packaging-table thead th.num {
  text-align: right;
}

.packaging-table thead th.management {
  text-align: center;
}

.packaging-table tbody td {
  height: 74px;
  padding: 9px 10px;
  border-bottom: 1px solid #f1f3f6;
  background: #fff;
  color: #2c3645;
  font-size: 12.5px;
  line-height: 18px;
  vertical-align: middle;
}

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

.packaging-table tbody tr:hover td {
  background: #fbfcfe;
}

.packaging-table tbody tr.is-low-stock td {
  background: #fffbfa;
}

.packaging-table tbody tr.is-low-stock:hover td {
  background: #fff7f5;
}

.packaging-table tbody tr.is-low-stock td:first-child {
  box-shadow: inset 3px 0 0 #e0a9a3;
}

.packaging-table tbody td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.packaging-table tbody td.management {
  text-align: center;
}

.packaging-thumb {
  display: grid;
  width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #e8ecf2;
  border-radius: 7px;
  background: #f7f9fc;
  color: #a0aab9;
}

button.packaging-thumb {
  padding: 0;
  cursor: zoom-in;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button.packaging-thumb:hover {
  border-color: #a9bce8;
  box-shadow: 0 0 0 3px rgba(46, 95, 223, 0.08);
}

button.packaging-thumb:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.48);
  outline-offset: 2px;
}

button.packaging-thumb:active {
  transform: scale(0.97);
}

.packaging-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.packaging-photo-viewer {
  z-index: 135;
}

.packaging-detail-drawer {
  width: min(560px, calc(100vw - 44px));
}

.packaging-detail-status {
  display: inline-flex;
  height: 23px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 9px;
  border-radius: 5px;
  background: #eef8f2;
  color: #2f8b6f;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.packaging-detail-status.is-low {
  background: #fff0ee;
  color: #c04444;
}

.packaging-detail-owners {
  padding: 5px 16px 11px;
}

.packaging-detail-owner-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #f3f5f8;
}

.packaging-detail-owner-row:last-child {
  border-bottom: 0;
}

.packaging-detail-owner-row span {
  min-width: 0;
  color: #5a6679;
  font-size: 12.5px;
  line-height: 19px;
  overflow-wrap: anywhere;
}

.packaging-detail-owner-row strong {
  flex: 0 0 auto;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  line-height: 19px;
  font-variant-numeric: tabular-nums;
}

.packaging-detail-image-wrap {
  padding: 14px 16px;
}

.packaging-detail-image-button {
  display: block;
  width: min(260px, 100%);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e8ebf1;
  border-radius: 8px;
  background: #f2f4f7;
  cursor: zoom-in;
}

.packaging-detail-image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.packaging-detail-image-button:hover {
  border-color: #aebfe8;
}

.packaging-detail-image-button:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.45);
  outline-offset: 2px;
}

.packaging-detail-image-empty {
  display: flex;
  min-height: 102px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px dashed #d9e0ea;
  border-radius: 8px;
  background: #fafbfd;
  color: #97a1af;
  font-size: 12px;
  line-height: 18px;
}

.packaging-detail-image-empty svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.packaging-thumb svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.packaging-code-value {
  color: #4b5c75;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11.5px;
  line-height: 17px;
  word-break: break-all;
}

.packaging-name-value {
  display: block;
  overflow: hidden;
  color: #263245;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.packaging-muted-value {
  color: #687587;
  line-height: 17px;
  word-break: break-word;
}

.packaging-price-value {
  color: #344154;
  font-weight: 500;
}

.packaging-stock-value {
  color: #334155;
  font-weight: 500;
}

.packaging-stock-value.is-low {
  color: #c54444;
}

.packaging-stock-badge {
  display: inline-flex;
  height: 19px;
  align-items: center;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 4px;
  background: #fff0ee;
  color: #bd4545;
  font-size: 9px;
  line-height: 1;
  vertical-align: 1px;
}

.packaging-warning-value.is-low {
  color: #c54444;
}

.packaging-row-actions {
  justify-content: center;
  gap: 10px;
}

.packaging-table-empty {
  min-height: 280px;
}

.packaging-type-tag {
  display: inline-flex;
  height: 23px;
  align-items: center;
  padding: 0 7px;
  border-radius: 5px;
  background: #f3f6fa;
  color: #52627a;
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
}

/* Form --------------------------------------------------------------------- */

.packaging-owner-control {
  min-width: 0;
}

.owner-price-add {
  display: inline-flex;
  height: 27px;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid #e1e7f0;
  border-radius: 6px;
  background: #fff;
  color: #4d6fc9;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 18px;
  white-space: nowrap;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.owner-price-add:hover {
  border-color: #b6c8ea;
  background: #f5f8ff;
  color: #2e5fdf;
}

.owner-price-add:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.45);
  outline-offset: 2px;
}

.owner-price-add svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.owner-price-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.owner-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
}

.owner-price-row.is-invalid .field-control {
  border-color: #e48484;
  background: #fffafa;
}

.owner-price-owner,
.owner-price-price {
  min-width: 0;
}

.owner-price-remove {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #9aa5b4;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.owner-price-remove:hover {
  border-color: #f0dddd;
  background: #fff7f7;
  color: #c44a4a;
}

.owner-price-remove:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.45);
  outline-offset: 1px;
}

.owner-price-remove svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.packaging-owner-lines,
.packaging-purchaser-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.packaging-owner-lines span,
.packaging-purchaser-lines span {
  display: block;
  overflow: hidden;
  color: #5a6679;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.packaging-purchaser-lines span {
  color: #39475b;
}

.packaging-detail-purchaser {
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5fb;
  color: #50617a;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 16px;
}

.packaging-image-control {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.packaging-image-tile {
  position: relative;
  display: grid;
  width: 160px;
  height: 120px;
  overflow: hidden;
  place-items: center;
  padding: 0;
  border: 1px dashed #ccd5e1;
  border-radius: 8px;
  background: #fafbfd;
  color: #8995a5;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.packaging-image-tile:hover {
  border-color: #7795df;
  background: #f4f7ff;
  color: #4168c5;
}

.packaging-image-tile:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.45);
  outline-offset: 2px;
}

.packaging-image-placeholder {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  line-height: 18px;
}

.packaging-image-placeholder svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.packaging-image-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.packaging-image-actions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.packaging-image-paste {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  background: #fff;
  color: #4e6078;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 18px;
  white-space: nowrap;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.packaging-image-paste:hover {
  border-color: #9fb5e7;
  background: #f7f9ff;
  color: #315bc1;
}

.packaging-image-paste:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.45);
  outline-offset: 2px;
}

.packaging-image-paste svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.packaging-image-remove {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c44a4a;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 18px;
  white-space: nowrap;
}

.packaging-image-remove:hover {
  color: #ad3838;
}

@media (max-width: 900px) {
  .packaging-summary {
    gap: 8px;
  }

  .packaging-summary-item {
    padding: 10px 12px;
  }

  .packaging-summary-item strong {
    font-size: 18px;
  }
}

@media (max-width: 760px) {
  .packaging-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 9px;
  }

  .packaging-summary-item {
    min-height: 57px;
    align-content: center;
    flex-wrap: wrap;
    gap: 1px 4px;
    padding: 9px 10px;
  }

  .packaging-summary-item span {
    flex-basis: 100%;
    font-size: 10px;
    line-height: 15px;
  }

  .packaging-summary-item strong {
    margin-left: 0;
    font-size: 19px;
    line-height: 23px;
  }

  .packaging-summary-item em {
    font-size: 9px;
  }

  .packaging-list-card .settings-card-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
  }

  .packaging-table-hint {
    display: none;
  }

  .packaging-col-resizer {
    display: none;
  }

  .packaging-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  .packaging-table colgroup,
  .packaging-table thead {
    display: none;
  }

  .packaging-table tbody {
    display: block;
  }

  .packaging-table tbody tr {
    display: block;
    padding: 13px 14px 10px;
    border-bottom: 1px solid #f0f2f5;
  }

  .packaging-table tbody tr:last-child {
    border-bottom: 0;
  }

  .packaging-table tbody td {
    display: block;
    width: auto;
    height: auto;
    padding: 3px 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    line-height: 19px;
    text-align: left !important;
    white-space: normal;
  }

  .packaging-table tbody tr.is-low-stock td {
    background: transparent;
  }

  .packaging-table tbody tr.is-low-stock td:first-child {
    box-shadow: none;
  }

  .packaging-table tbody td::before {
    display: inline;
    margin-right: 9px;
    color: #929baa;
    content: attr(data-label);
    font-size: 11px;
  }

  .packaging-table tbody td.packaging-image-cell {
    padding-bottom: 8px;
  }

  .packaging-table tbody td.packaging-image-cell::before {
    content: none;
  }

  .packaging-thumb {
    width: 54px;
    height: 54px;
    border-radius: 8px;
  }

  .packaging-thumb svg {
    width: 22px;
    height: 22px;
  }

  .packaging-name-value {
    white-space: normal;
  }

  .packaging-table tbody td.num {
    text-align: left;
  }

  .packaging-table tbody td.management {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 9px;
    border-top: 1px dashed #eef1f5;
  }

  .packaging-table tbody td.management::before {
    content: attr(data-label);
    color: #929baa;
    font-size: 11px;
  }

  .packaging-row-actions {
    margin-left: auto;
    justify-content: flex-end;
  }

  .packaging-table-empty {
    min-height: 230px;
  }

  .packaging-image-control {
    align-items: flex-start;
    flex-direction: column;
  }

  .packaging-image-tile {
    width: 100%;
    max-width: 260px;
    height: 180px;
  }

  .packaging-image-actions {
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .owner-price-row {
    grid-template-columns: minmax(0, 1fr) 27px;
    gap: 6px;
  }

  .owner-price-remove {
    width: 27px;
    height: 27px;
  }
}

@media (max-width: 760px) {
  .packaging-detail-drawer {
    width: 100%;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Centered table rows only ------------------------------------------------ */

.packaging-centered .packaging-table thead th,
.packaging-centered .packaging-table tbody td,
.packaging-centered .packaging-table tbody td.num,
.packaging-centered .packaging-table tbody td.management {
  text-align: center;
}

.packaging-centered .packaging-thumb {
  margin-right: auto;
  margin-left: auto;
}

.packaging-centered .packaging-owner-lines,
.packaging-centered .packaging-purchaser-lines {
  align-items: center;
}

.packaging-centered .packaging-owner-lines span,
.packaging-centered .packaging-purchaser-lines span {
  text-align: center;
}

.packaging-centered .packaging-row-actions {
  justify-content: center;
}

@media (max-width: 760px) {
  .packaging-centered .packaging-table tbody td {
    text-align: center;
  }

  .packaging-centered .packaging-table tbody td::before {
    text-align: center;
  }

  .packaging-centered .packaging-table tbody td.management {
    justify-content: center;
    gap: 10px;
  }

  .packaging-centered .packaging-row-actions {
    margin-left: 0;
  }
}

/* Arrival booking ---------------------------------------------------------- */

.arrival-table-wrap {
  position: relative;
  overflow-x: auto;
  scrollbar-color: #d6dbe3 transparent;
  scrollbar-width: thin;
}

.arrival-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.arrival-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 8px;
  background: #d6dbe3;
}

.arrival-table {
  width: 100%;
  min-width: 1540px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.arrival-table col.arr-col-no {
  width: 7.5%;
}

.arrival-table col.arr-col-owner {
  width: 6%;
}

.arrival-table col.arr-col-warehouse {
  width: 6%;
}

.arrival-table col.arr-col-plate {
  width: 8.5%;
}

.arrival-table col.arr-col-time {
  width: 9%;
}

.arrival-table col.arr-col-arrival-time {
  width: 9%;
}

.arrival-table col.arr-col-complete-time {
  width: 9%;
}

.arrival-table col.arr-col-progress {
  width: 5.5%;
}

.arrival-table col.arr-col-product {
  width: 7.5%;
}

.arrival-table col.arr-col-qty {
  width: 3%;
}

.arrival-table col.arr-col-weight {
  width: 3.5%;
}

.arrival-table col.arr-col-volume {
  width: 3%;
}

.arrival-table col.arr-col-loading {
  width: 3.5%;
}

.arrival-table col.arr-col-pallet {
  width: 3.5%;
}

.arrival-table col.arr-col-party {
  width: 4%;
}

.arrival-table col.arr-col-fee {
  width: 3.5%;
}

.arrival-table col.arr-col-actions {
  width: 8%;
}

.arrival-table thead th {
  height: 44px;
  padding: 0 7px;
  border-bottom: 1px solid #eff1f5;
  background: #f7f8fb;
  color: #697487;
  font-size: 11.5px;
  font-weight: 450;
  line-height: 15px;
  text-align: left;
  white-space: normal;
}

.arrival-table thead th.num {
  text-align: right;
}

.arrival-table thead th.arrival-actions-head {
  text-align: center;
}

.arrival-table tbody td {
  min-height: 58px;
  padding: 10px;
  border-bottom: 1px solid #f1f3f6;
  background: #fff;
  color: #2c3645;
  font-size: 12.5px;
  line-height: 18px;
  vertical-align: middle;
}

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

.arrival-table tbody tr:hover td {
  background: #fbfcfe;
}

.arrival-table tbody td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.arrival-table tbody td.arrival-actions {
  text-align: center;
}

.arrival-no-value {
  color: #40526b;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11.5px;
  line-height: 17px;
  word-break: break-all;
}

.arrival-owner-value {
  display: block;
  overflow: hidden;
  color: #263245;
  font-size: 12.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrival-time-value {
  color: #48576d;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.arrival-product-value {
  display: block;
  overflow: hidden;
  color: #536175;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrival-party-tag {
  display: inline-flex;
  height: 23px;
  align-items: center;
  padding: 0 7px;
  border-radius: 5px;
  background: #f3f6fa;
  color: #52627a;
  font-size: 11.5px;
  line-height: 1;
  white-space: nowrap;
}

.arrival-progress-badge {
  display: inline-flex;
  height: 23px;
  align-items: center;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.arrival-progress-badge.is-pending {
  background: #f3f5f8;
  color: #7d8898;
}

.arrival-progress-badge.is-unloading {
  background: #fff7e8;
  color: #a8751d;
}

.arrival-progress-badge.is-completed {
  background: #edf8f1;
  color: #2f8b5d;
}

.arrival-pallet-value {
  color: #536175;
  font-variant-numeric: tabular-nums;
}

.arrival-plate-value {
  color: #354257;
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.arrival-action-time {
  color: #536175;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.arrival-table tbody td:first-child,
.arrival-table .arrival-time-value {
  white-space: nowrap;
}

.arrival-row-actions {
  justify-content: center;
  gap: 6px;
}

.arrival-row-actions .account-text-button {
  white-space: nowrap;
}

.arrival-warehouse-value {
  display: block;
  overflow: hidden;
  color: #536175;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrival-detail-drawer {
  width: min(560px, calc(100vw - 44px));
}

.arrival-confirm-card {
  border-color: #e7ecf4;
}

.arrival-confirm-status {
  display: inline-flex;
  height: 23px;
  align-items: center;
  padding: 0 8px;
  border-radius: 5px;
  background: #f3f5f8;
  color: #8792a2;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.arrival-confirm-status.is-confirmed {
  background: #edf8f1;
  color: #2f8b5d;
}

.arrival-confirm-body {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  padding: 18px 16px 20px;
  text-align: center;
}

.arrival-confirm-time {
  color: #223047;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 32px;
  font-variant-numeric: tabular-nums;
}

.arrival-confirm-hint {
  margin: 0;
  color: #96a0ae;
  font-size: 11.5px;
  line-height: 18px;
}

.arrival-confirm-btn {
  min-width: 128px;
  height: 36px;
  margin-top: 3px;
  padding: 0 20px;
}

@media (max-width: 760px) {
  .arrival-detail-drawer {
    width: 100%;
    max-width: none;
  }

  .arrival-confirm-time {
    font-size: 22px;
    line-height: 30px;
  }
}

.arrival-textarea {
  height: auto;
  min-height: 82px;
  padding: 9px 12px;
  line-height: 21px;
  resize: vertical;
}

.field-readonly {
  background: #f7f8fb;
  color: #526176;
  cursor: default;
}

.field-readonly:focus {
  border-color: #e1e5eb;
  box-shadow: none;
}

.arrival-table-empty {
  min-height: 260px;
}

@media (max-width: 760px) {
  .arrival-table-wrap {
    overflow: visible;
  }

  .arrival-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  .arrival-table colgroup,
  .arrival-table thead {
    display: none;
  }

  .arrival-table tbody {
    display: block;
  }

  .arrival-table tbody tr {
    display: block;
    padding: 13px 14px 10px;
    border-bottom: 1px solid #f0f2f5;
  }

  .arrival-table tbody tr:last-child {
    border-bottom: 0;
  }

  .arrival-table tbody td {
    display: block;
    width: auto;
    min-height: 0;
    padding: 3px 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    line-height: 19px;
    text-align: left;
    white-space: normal;
  }

  .arrival-table tbody td::before {
    display: inline;
    margin-right: 9px;
    color: #929baa;
    content: attr(data-label);
    font-size: 11px;
  }

  .arrival-table tbody td:first-child {
    padding-bottom: 7px;
  }

  .arrival-table tbody td:first-child::before {
    content: none;
  }

  .arrival-table tbody td.num {
    text-align: left;
  }

  .arrival-table tbody td.arrival-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 9px;
    border-top: 1px dashed #eef1f5;
    text-align: left;
  }

  .arrival-table tbody td.arrival-actions::before {
    content: attr(data-label);
  }

  .arrival-row-actions {
    margin-left: auto;
  }

  .arrival-no-value {
    font-size: 12px;
  }

  .arrival-owner-value {
    white-space: normal;
  }

  .arrival-product-value {
    white-space: normal;
  }
}

/* Arrival filters ---------------------------------------------------------- */

.arrival-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 28, 44, 0.022);
}

.arrival-filter-field {
  min-width: 0;
}

.arrival-filter-field label {
  display: block;
  margin-bottom: 6px;
  color: #6b7789;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 17px;
}

.arrival-filter-control {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  outline: 0;
  background: #fafbfc;
  color: #354257;
  font-size: 12.5px;
  line-height: 20px;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

select.arrival-filter-control {
  appearance: none;
  padding-right: 32px;
  cursor: pointer;
}

.arrival-filter-control:focus {
  border-color: #9db4eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 95, 223, 0.08);
}

.arrival-filter-reset {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  background: #fff;
  color: #667286;
  cursor: pointer;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.arrival-filter-reset:hover {
  border-color: #b8c8e8;
  background: #f7f9fd;
  color: #315bc1;
}

.arrival-filter-reset:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.45);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .arrival-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }

  .arrival-filter-reset {
    align-self: end;
  }
}

@media (max-width: 760px) {
  .arrival-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 12px;
  }

  .arrival-filter-reset {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 420px) {
  .arrival-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .arrival-filter-reset {
    grid-column: auto;
  }
}

/* Arrival receipt ---------------------------------------------------------- */

.arrival-receipt-body {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  text-align: center;
}

.arrival-receipt-stage {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.arrival-receipt-empty {
  display: flex;
  width: 100%;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1px dashed #d6deea;
  border-radius: 8px;
  background: #fafbfd;
  color: #97a1af;
  font-size: 12px;
  line-height: 18px;
}

.arrival-receipt-empty svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.arrival-receipt-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid #e7ebf1;
  border-radius: 8px;
  background: #f7f9fc;
}

.arrival-receipt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.arrival-receipt-upload,
.arrival-receipt-paste {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  background: #fff;
  color: #4e6078;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 18px;
  white-space: nowrap;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.arrival-receipt-upload:hover,
.arrival-receipt-paste:hover {
  border-color: #9fb5e7;
  background: #f7f9ff;
  color: #315bc1;
}

.arrival-receipt-upload:focus-visible,
.arrival-receipt-paste:focus-visible,
.arrival-receipt-remove:focus-visible {
  outline: 2px solid rgba(46, 95, 223, 0.45);
  outline-offset: 2px;
}

.arrival-receipt-paste svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.arrival-receipt-remove {
  height: 32px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: #c44a4a;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 18px;
}

.arrival-receipt-remove:hover {
  color: #ad3838;
}

.arrival-receipt-hint {
  margin: 0;
  color: #9aa4b2;
  font-size: 10.5px;
  line-height: 17px;
}

@media (max-width: 760px) {
  .arrival-receipt-image {
    max-height: 300px;
  }

  .arrival-receipt-empty {
    min-height: 135px;
  }
}

/* Centered arrival list ---------------------------------------------------- */

.arrival-centered .settings-heading {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
}

.arrival-centered .settings-heading-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.arrival-centered .settings-subtitle {
  max-width: 720px;
  margin-right: 0;
  margin-left: 0;
}

.arrival-centered .btn-page-action {
  align-self: flex-start;
}

.arrival-centered .arrival-table thead th,
.arrival-centered .arrival-table tbody td,
.arrival-centered .arrival-table tbody td.num,
.arrival-centered .arrival-table tbody td.arrival-actions {
  text-align: center;
}

.arrival-centered .arrival-row-actions {
  justify-content: center;
}

.arrival-centered .arrival-progress-badge,
.arrival-centered .arrival-party-tag {
  vertical-align: middle;
}

@media (max-width: 760px) {
  .arrival-centered .settings-heading {
    align-items: flex-start;
  }

  .arrival-centered .arrival-table tbody td {
    text-align: center;
  }

  .arrival-centered .arrival-table tbody td::before {
    text-align: center;
  }

  .arrival-centered .arrival-table tbody td.arrival-actions {
    justify-content: center;
    gap: 10px;
  }

  .arrival-centered .arrival-row-actions {
    margin-left: 0;
  }
}


/* Third-level navigation --------------------------------------------------- */

.nav-subgroup {
  width: 100%;
}

.nav-subparent {
  height: 42px;
  width: calc(100% - 30px);
  margin-left: 30px;
  padding: 0 12px 0 14px;
  border-radius: 8px;
  color: #bec5d2;
  font-size: 14.5px;
  font-weight: 400;
}

.nav-subparent:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
}

.nav-subparent .nav-child-chevron {
  margin-left: auto;
  transition: transform 170ms ease;
}

.nav-subgroup:not(.is-open) .nav-subparent .nav-child-chevron {
  transform: rotate(-90deg);
}

.nav-subchildren {
  display: none;
  position: relative;
  margin-left: 54px;
  padding: 1px 0 2px 9px;
}

.nav-subgroup.is-open > .nav-subchildren {
  display: block;
}

.nav-subchildren::before {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.11);
  content: "";
}

.nav-grandchild {
  height: 34px;
  width: 100%;
  margin-left: 0;
  padding: 0 10px;
  border-radius: 6px;
  color: #9ea8b8;
  font-size: 13px;
  font-weight: 400;
}

.nav-grandchild:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #f1f4f9;
}

.nav-grandchild .nav-label {
  position: relative;
}

.nav-grandchild .nav-label::before {
  position: absolute;
  top: 50%;
  left: -9px;
  width: 3px;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 50%;
  background: #6f7a8e;
  content: "";
}

.app-shell.is-sidebar-collapsed .nav-subchildren {
  display: none !important;
}

/* Customer quotes ---------------------------------------------------------- */

.quote-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.quote-stat {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 28, 44, 0.022);
}

.quote-stat span {
  color: #8b96a7;
  font-size: 11.5px;
  line-height: 17px;
}

.quote-stat strong {
  color: #263246;
  font-size: 23px;
  font-weight: 650;
  line-height: 28px;
  font-variant-numeric: tabular-nums;
}

.quote-stat.is-pending strong {
  color: #b27a1e;
}

.quote-stat.is-approved strong {
  color: #2f8b5d;
}

.quote-stat.is-rejected strong {
  color: #c04c4c;
}

.quote-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quote-status-filter select {
  height: 36px;
  min-width: 108px;
  padding: 0 30px 0 10px;
  border: 1px solid #e3e7ed;
  border-radius: 8px;
  outline: 0;
  background: #fafbfc;
  color: #536175;
  font-size: 12px;
  cursor: pointer;
}

.quote-status-filter select:focus {
  border-color: #9db4eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 95, 223, 0.08);
}

.quote-list-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.quote-list-table th {
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid #eff1f5;
  background: #f7f8fb;
  color: #697487;
  font-size: 11.5px;
  font-weight: 450;
  line-height: 16px;
  text-align: left;
  white-space: nowrap;
}

.quote-list-table td {
  height: 54px;
  padding: 9px 12px;
  border-bottom: 1px solid #f1f3f6;
  color: #405066;
  font-size: 12.5px;
  line-height: 19px;
  vertical-align: middle;
}

.quote-list-table tbody tr:last-child td {
  border-bottom: 0;
}

.quote-list-table tbody tr:hover td {
  background: #fbfcfe;
}

.quote-list-table col.quote-col-no {
  width: 15%;
}

.quote-list-table col.quote-col-customer {
  width: 18%;
}

.quote-list-table col.quote-col-date {
  width: 11%;
}

.quote-list-table col.quote-col-valid {
  width: 11%;
}

.quote-list-table col.quote-col-items {
  width: 8%;
}

.quote-list-table col.quote-col-status {
  width: 10%;
}

.quote-list-table col.quote-col-updated {
  width: 12%;
}

.quote-list-table col.quote-col-actions {
  width: 15%;
}

.quote-no-value {
  color: #263246;
  font-size: 11.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quote-customer-value {
  display: block;
  overflow: hidden;
  color: #344157;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-muted {
  color: #8f99a8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quote-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.quote-row-actions .account-text-button {
  padding: 0;
  font-size: 11.5px;
  white-space: nowrap;
}

.quote-status-badge {
  display: inline-flex;
  height: 23px;
  align-items: center;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
}

.quote-status-badge.is-draft {
  background: #f2f4f7;
  color: #7c8797;
}

.quote-status-badge.is-pending {
  background: #fff7e8;
  color: #a8751d;
}

.quote-status-badge.is-approved {
  background: #edf8f1;
  color: #2f8b5d;
}

.quote-status-badge.is-rejected {
  background: #fff1f1;
  color: #c04c4c;
}

.quote-pricing-block {
  padding: 20px 24px 22px;
  border-bottom: 1px solid #f0f2f5;
}

.quote-pricing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.quote-pricing-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.quote-pricing-title > span {
  display: inline-flex;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #eef3ff;
  color: #315bc1;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
}

.quote-pricing-title h3 {
  margin: 1px 0 0;
  color: #263246;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 20px;
}

.quote-pricing-title p {
  margin: 2px 0 0;
  color: #96a0ae;
  font-size: 10.5px;
  line-height: 16px;
}

.quote-pricing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.quote-text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #7c8798;
  cursor: pointer;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
}

.quote-text-action:hover {
  color: #315bc1;
}

.quote-add-row {
  display: inline-flex;
  height: 29px;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid #dfe6f1;
  border-radius: 6px;
  background: #fff;
  color: #3d5f9b;
  cursor: pointer;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
}

.quote-add-row:hover {
  border-color: #b9c9e8;
  background: #f8faff;
}

.quote-add-row svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.quote-input-wrap {
  overflow-x: auto;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #fff;
}

.quote-input-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.quote-input-table--warehouse,
.quote-input-table--value {
  min-width: 760px;
}

.quote-input-table--express {
  min-width: 1100px;
}

.quote-input-table th {
  height: 34px;
  padding: 0 8px;
  border-bottom: 1px solid #eef1f5;
  background: #f8f9fc;
  color: #7d8898;
  font-size: 10.5px;
  font-weight: 450;
  line-height: 15px;
  text-align: left;
  white-space: nowrap;
}

.quote-input-table td {
  height: 47px;
  padding: 6px 7px;
  border-bottom: 1px solid #f2f4f7;
  background: #fff;
}

.quote-input-table tbody tr:last-child td {
  border-bottom: 0;
}

.quote-input-table td:first-child {
  padding-left: 8px;
}

.quote-input-table input {
  width: 100%;
  height: 32px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #e6eaf0;
  border-radius: 5px;
  outline: 0;
  background: #fbfcfd;
  color: #344157;
  font-size: 11.5px;
  line-height: 18px;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.quote-input-table input::placeholder {
  color: #b1b9c5;
}

.quote-input-table input:focus {
  border-color: #9db4eb;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(46, 95, 223, 0.07);
}

.quote-input-table input[type="number"] {
  text-align: right;
}

.quote-row-action-head {
  width: 56px;
  text-align: center !important;
}

.quote-remove-row {
  display: inline-flex;
  width: 26px;
  height: 26px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #c45c5c;
  cursor: pointer;
}

.quote-remove-row:hover {
  background: #fff1f1;
}

.quote-remove-row svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.quote-input-table td:last-child {
  text-align: center;
}

.quote-form-actions {
  margin-top: 14px;
}

.quote-detail-drawer {
  width: min(620px, calc(100vw - 44px));
}

.quote-detail-section {
  overflow-x: auto;
  padding: 0 16px 16px;
}

.quote-detail-table {
  width: 100%;
  min-width: 430px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #edf0f4;
  border-radius: 7px;
  overflow: hidden;
}

.quote-detail-table th {
  padding: 8px 9px;
  background: #f7f9fc;
  color: #7c8797;
  font-size: 10.5px;
  font-weight: 450;
  text-align: left;
}

.quote-detail-table td {
  padding: 9px;
  border-top: 1px solid #f0f3f7;
  color: #3e4d62;
  font-size: 11.5px;
  line-height: 17px;
}

.quote-detail-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.quote-detail-empty {
  padding: 12px;
  color: #9aa4b2;
  font-size: 11px;
  text-align: center;
}

.quote-review-summary {
  padding: 0 16px 14px;
  color: #6d7989;
  font-size: 12px;
  line-height: 21px;
}

.quote-review-summary p {
  margin: 0;
}

.quote-review-summary p + p {
  margin-top: 5px;
}

.quote-review-summary strong {
  color: #3b4a5f;
  font-weight: 550;
}

.quote-review-form {
  padding: 0 16px 18px;
}

.quote-review-form label {
  display: block;
  margin-bottom: 6px;
  color: #59677a;
  font-size: 11.5px;
  line-height: 18px;
}

.quote-review-form textarea {
  width: 100%;
  min-height: 76px;
  padding: 9px 10px;
  border: 1px solid #e1e6ed;
  border-radius: 7px;
  outline: 0;
  background: #fafbfc;
  color: #344157;
  font-size: 12px;
  line-height: 19px;
  resize: vertical;
}

.quote-review-form textarea:focus {
  border-color: #9db4eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 95, 223, 0.08);
}

.quote-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.quote-reject-btn {
  border-color: #efd4d4;
  color: #b74c4c;
}

.quote-reject-btn:hover {
  border-color: #dfb0b0;
  background: #fff8f8;
  color: #a53e3e;
}

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

  .quote-toolbar-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .quote-status-filter select,
  .quote-toolbar-actions .table-search {
    width: 100%;
  }

  .quote-pricing-head {
    flex-direction: column;
  }

  .quote-pricing-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .quote-detail-drawer {
    width: 100%;
    max-width: none;
  }

  .quote-list-card .settings-card-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-list-table {
    min-width: 0;
  }

  .quote-list-table thead {
    display: none;
  }

  .quote-list-table,
  .quote-list-table tbody,
  .quote-list-table tr,
  .quote-list-table td {
    display: block;
    width: 100%;
  }

  .quote-list-table tbody tr {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f2f5;
  }

  .quote-list-table tbody tr:last-child {
    border-bottom: 0;
  }

  .quote-list-table td {
    display: flex;
    height: auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }

  .quote-list-table td::before {
    flex: 0 0 auto;
    color: #94a0b0;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 400;
    text-align: left;
  }

  .quote-list-table td:first-child {
    display: block;
    padding: 0 0 7px;
    text-align: left;
  }

  .quote-list-table td:first-child::before {
    display: none;
  }

  .quote-list-table td:last-child {
    justify-content: flex-end;
    padding-top: 9px;
  }

  .quote-list-table td:last-child::before {
    margin-right: auto;
  }

  .quote-row-actions {
    justify-content: flex-end;
  }

  .quote-form-actions {
    align-items: stretch;
  }

  .quote-form-actions .form-actions-buttons {
    width: 100%;
    flex-wrap: wrap;
  }

  .quote-form-actions .btn {
    flex: 1 1 auto;
  }

  .quote-pricing-block {
    padding: 16px 14px 18px;
  }

  .quote-pricing-actions {
    gap: 8px;
  }

  .quote-input-table--warehouse,
  .quote-input-table--value {
    min-width: 680px;
  }

  .quote-input-table--express {
    min-width: 1040px;
  }
}


.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Quote selection and batch operations ------------------------------------ */

.quote-list-table col.quote-col-check {
  width: 4%;
}

.quote-list-table col.quote-col-no {
  width: 13%;
}

.quote-list-table col.quote-col-customer {
  width: 17%;
}

.quote-list-table col.quote-col-date,
.quote-list-table col.quote-col-valid {
  width: 10%;
}

.quote-list-table col.quote-col-items {
  width: 7%;
}

.quote-list-table col.quote-col-status {
  width: 9%;
}

.quote-list-table col.quote-col-updated {
  width: 11%;
}

.quote-list-table col.quote-col-actions {
  width: 19%;
}

.quote-check-head,
.quote-check-cell {
  width: 38px;
  padding-right: 2px !important;
  padding-left: 12px !important;
  text-align: left;
}

.quote-check-head input,
.quote-check-cell input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #2f5fdf;
  cursor: pointer;
}

.quote-list-table.is-view-only col.quote-col-check {
  width: 0;
}

.quote-list-table.is-view-only .quote-check-head,
.quote-list-table.is-view-only .quote-check-cell {
  display: none;
}

.quote-batch-bar {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid #edf1f6;
  background: #f7faff;
}

.quote-batch-summary {
  color: #607089;
  font-size: 11.5px;
  line-height: 18px;
  white-space: nowrap;
}

.quote-batch-summary strong {
  color: #2f5fdf;
  font-weight: 650;
}

.quote-batch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.quote-batch-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #3f5f9b;
  cursor: pointer;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
}

.quote-batch-action:hover {
  color: #244fae;
}

.quote-batch-action.is-danger {
  color: #b84d4d;
}

.quote-batch-action.is-danger:hover {
  color: #9e3737;
}

.quote-batch-action.is-quiet {
  color: #8792a2;
}

.quote-list-table tbody td.quote-check-cell {
  text-align: left;
}

@media (max-width: 760px) {
  .quote-batch-bar {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 14px;
  }

  .quote-batch-actions {
    justify-content: flex-start;
  }

  .quote-list-table td.quote-check-cell {
    display: flex;
    justify-content: flex-start;
    padding: 0 0 6px;
  }

  .quote-list-table td.quote-check-cell::before {
    display: none;
  }

  .quote-list-table td:nth-child(2) {
    display: block;
    padding: 0 0 7px;
    text-align: left;
  }

  .quote-list-table td:nth-child(2)::before {
    display: none;
  }
}

/* Return management -------------------------------------------------------- */

.return-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.return-heading-actions .btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.return-list-table {
  min-width: 1280px;
}

.return-list-table col.return-col-no {
  width: 13%;
}

.return-list-table col.return-col-owner {
  width: 11%;
}

.return-list-table col.return-col-warehouse {
  width: 11%;
}

.return-list-table col.return-col-tracking {
  width: 13%;
}

.return-list-table col.return-col-type {
  width: 9%;
}

.return-list-table col.return-col-product {
  width: 14%;
}

.return-list-table col.return-col-qty {
  width: 5%;
}

.return-list-table col.return-col-status {
  width: 8%;
}

.return-list-table col.return-col-source {
  width: 8%;
}

.return-list-table col.return-col-actions {
  width: 8%;
}

.return-no-value {
  color: #263246;
  font-size: 11.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.return-owner-value,
.return-product-value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.return-tracking-value {
  display: block;
  overflow: hidden;
  color: #52627a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.return-type-tag,
.return-source-tag {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 5px;
  background: #f3f6fa;
  color: #5d6c81;
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
}

.return-source-tag.is-pda {
  background: #eef3ff;
  color: #315bc1;
}

.return-source-tag.is-import {
  background: #f5f1ff;
  color: #7252b5;
}

.return-row-actions .account-text-button {
  white-space: nowrap;
}

.return-detail-drawer {
  width: min(560px, calc(100vw - 44px));
}

.return-status-card {
  background: #fbfcfe;
}

.return-status-hint {
  margin: 0;
  padding: 0 16px 16px;
  color: #738094;
  font-size: 12px;
  line-height: 20px;
}

.return-status-card .detail-card-head {
  padding-bottom: 7px;
}

.return-exception-btn {
  border-color: #efd4d4;
  color: #b74c4c;
}

.return-exception-btn:hover {
  border-color: #dfb0b0;
  background: #fff8f8;
  color: #a53e3e;
}

.return-scan-modal {
  width: min(700px, calc(100vw - 40px));
  max-height: min(88vh, 820px);
  overflow-y: auto;
  padding: 0;
}

.return-scan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px 16px;
  border-bottom: 1px solid #f0f2f5;
}

.return-scan-head h2 {
  margin: 4px 0 0;
  color: #202b3b;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 27px;
}

.return-scan-head .modal-close {
  position: static;
  flex: 0 0 auto;
}

.return-scan-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 22px 4px;
  padding: 14px;
  border: 1px solid #dfe8f7;
  border-radius: 9px;
  background: #f7faff;
}

.return-scan-icon {
  display: flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eaf1ff;
  color: #2f5fdf;
}

.return-scan-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.return-scan-input-wrap {
  min-width: 0;
  flex: 1;
}

.return-scan-input-wrap label {
  display: block;
  margin-bottom: 5px;
  color: #59677a;
  font-size: 11.5px;
  font-weight: 550;
  line-height: 18px;
}

.return-scan-input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #cddbf0;
  border-radius: 7px;
  outline: 0;
  background: #fff;
  color: #263246;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.return-scan-input-wrap input:focus {
  border-color: #7798df;
  box-shadow: 0 0 0 3px rgba(47, 95, 223, 0.1);
}

.return-scan-input-wrap p {
  margin: 5px 0 0;
  color: #97a2b1;
  font-size: 10.5px;
  line-height: 16px;
}

.return-scan-modal .form-grid {
  padding: 14px 22px 0;
}

.return-scan-modal .form-field {
  margin: 0;
}

.return-scan-error {
  margin: 12px 22px 0;
  padding: 9px 11px;
  border: 1px solid #f0d1d1;
  border-radius: 7px;
  background: #fff7f7;
  color: #b33d3d;
  font-size: 11.5px;
  line-height: 18px;
}

.return-scan-actions {
  padding: 17px 22px 21px;
}

@media (max-width: 900px) {
  .return-heading-actions {
    justify-content: flex-start;
  }

  .return-list-card .settings-card-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .return-detail-drawer {
    width: 100%;
    max-width: none;
  }

  .return-list-table {
    min-width: 0;
  }

  .return-list-table td:nth-child(2) {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0;
    text-align: right;
  }

  .return-list-table td:nth-child(2)::before {
    display: block;
    flex: 0 0 auto;
    color: #94a0b0;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 400;
    text-align: left;
  }

  .return-list-table td:last-child {
    justify-content: flex-end;
    padding-top: 9px;
  }

  .return-heading-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .return-heading-actions .btn {
    justify-content: center;
  }

  .return-scan-modal {
    width: calc(100vw - 20px);
    max-height: 92vh;
    border-radius: 12px;
  }

  .return-scan-head {
    padding: 18px 16px 14px;
  }

  .return-scan-callout {
    margin-right: 16px;
    margin-left: 16px;
    padding: 12px;
  }

  .return-scan-modal .form-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 16px;
    padding-left: 16px;
  }

  .return-scan-modal .form-span-2 {
    grid-column: auto;
  }

  .return-scan-error {
    margin-right: 16px;
    margin-left: 16px;
  }

  .return-scan-actions {
    padding-right: 16px;
    padding-left: 16px;
  }
}

/* -------------------------------------------------------------------------- */
/* 基础配置 · 客户信息                                                          */
/* -------------------------------------------------------------------------- */

/* 仅在桌面端限制最小宽度；移动端沿用 .warehouse-table 的卡片式布局（min-width: 0）。 */
@media (min-width: 761px) {
  .customer-table {
    min-width: 1000px;
  }
}

.customer-table col.ct-col-name {
  width: 19%;
}

.customer-table col.ct-col-warehouse {
  width: 21%;
}

.customer-table col.ct-col-business {
  width: 14%;
}

.customer-table col.ct-col-contact {
  width: 14%;
}

.customer-table col.ct-col-address {
  width: 21%;
}

.customer-table col.ct-col-manage {
  width: 11%;
}

.customer-name-cell .cell-primary,
.customer-warehouse-cell .cell-primary,
.customer-address-cell .cell-primary {
  display: block;
  overflow: hidden;
  color: #253041;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-warehouse-cell .cell-primary {
  color: #3d4a5e;
  font-weight: 450;
}

.customer-address-cell .cell-primary {
  color: #4c596c;
  font-weight: 400;
}

.customer-code-tag {
  display: inline-flex;
  height: 20px;
  align-items: center;
  margin-top: 5px;
  padding: 0 7px;
  border-radius: 4px;
  background: #eef2f8;
  color: #5b6a80;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
  line-height: 1;
  white-space: nowrap;
}

.customer-code-tag.is-large {
  height: 24px;
  margin-top: 0;
  padding: 0 9px;
  background: #eef3ff;
  color: #3563cd;
  font-size: 12px;
}

/* Return warehouse details ------------------------------------------------- */

.return-warehouse-info {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #e2eaf6;
  border-radius: 9px;
  background: #f7faff;
}

.return-warehouse-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.return-warehouse-info-head span {
  color: #40516a;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 18px;
}

.return-warehouse-info-head em {
  color: #9ba7b8;
  font-size: 10px;
  font-style: normal;
  line-height: 16px;
}

.return-warehouse-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}

.return-warehouse-info-grid > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.return-warehouse-info-grid span {
  flex: 0 0 auto;
  color: #8f9bac;
  font-size: 10.5px;
  line-height: 18px;
}

.return-warehouse-info-grid strong {
  overflow: hidden;
  color: #40516a;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.return-warehouse-info-address {
  grid-column: 1 / -1;
}

.return-warehouse-info-address strong {
  white-space: normal;
}

.return-warehouse-info--scan {
  margin: 14px 22px 0;
}

@media (max-width: 760px) {
  .return-warehouse-info-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .return-warehouse-info-address {
    grid-column: auto;
  }

  .return-warehouse-info-grid > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .return-warehouse-info--scan {
    margin: 12px 16px 0;
  }
}

.quote-customer-sub {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #98a2b1;
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.return-detail-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 0 16px 16px;
}

.return-detail-photo {
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid #e5eaf1;
  border-radius: 7px;
  background: #f7f9fc;
}

.return-detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Return selection and system inbound -------------------------------------- */

.return-list-table {
  min-width: 1340px;
}

.return-list-table col.return-col-check {
  width: 4%;
}

.return-list-table col.return-col-no {
  width: 12%;
}

.return-list-table col.return-col-owner {
  width: 10%;
}

.return-list-table col.return-col-warehouse {
  width: 10%;
}

.return-list-table col.return-col-tracking {
  width: 12%;
}

.return-list-table col.return-col-type {
  width: 9%;
}

.return-list-table col.return-col-product {
  width: 14%;
}

.return-list-table col.return-col-qty {
  width: 5%;
}

.return-list-table col.return-col-status {
  width: 8%;
}

.return-list-table col.return-col-source {
  width: 8%;
}

.return-list-table col.return-col-actions {
  width: 8%;
}

.return-batch-bar {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid #edf1f6;
  background: #f7faff;
}

.return-batch-bar > span {
  color: #607089;
  font-size: 11.5px;
  line-height: 18px;
}

.return-batch-bar strong {
  color: #2f5fdf;
  font-weight: 650;
}

.return-batch-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.return-batch-inbound {
  height: 30px;
  padding: 0 11px;
  border: 1px solid #cbd9f1;
  border-radius: 6px;
  background: #fff;
  color: #315bc1;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 18px;
}

.return-batch-inbound:hover {
  border-color: #9db4eb;
  background: #f3f7ff;
}

.return-batch-clear {
  padding: 0;
  border: 0;
  background: transparent;
  color: #8792a2;
  cursor: pointer;
  font-size: 11px;
  line-height: 18px;
}

.return-batch-clear:hover {
  color: #5f6e84;
}

.return-inbound-card {
  margin-bottom: 14px;
}

.return-inbound-table {
  min-width: 900px;
}

.return-inbound-table th:nth-child(1) { width: 16%; }
.return-inbound-table th:nth-child(2) { width: 14%; }
.return-inbound-table th:nth-child(3) { width: 18%; }
.return-inbound-table th:nth-child(4) { width: 28%; }
.return-inbound-table th:nth-child(5) { width: 8%; }
.return-inbound-table th:nth-child(6) { width: 16%; }

.return-inbound-form {
  margin-top: 0;
}

.return-inbound-form .form-actions {
  margin-top: 14px;
}

@media (max-width: 760px) {
  .return-batch-bar {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 14px;
  }

  .return-list-table col.return-col-check {
    width: 0;
  }

  .return-list-table td.quote-check-cell {
    display: flex;
    justify-content: flex-start;
    padding: 0 0 6px;
  }

  .return-list-table td.quote-check-cell::before {
    display: none;
  }

  .return-list-table td:nth-child(2) {
    display: block;
    padding: 0 0 7px;
    text-align: left;
  }

  .return-list-table td:nth-child(2)::before {
    display: none;
  }

  .return-list-table td:nth-child(3) {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0;
    text-align: right;
  }

  .return-list-table td:nth-child(3)::before {
    display: block;
    flex: 0 0 auto;
    color: #94a0b0;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 400;
    text-align: left;
  }

  .return-inbound-table {
    min-width: 0;
  }

  .return-inbound-table thead {
    display: none;
  }

  .return-inbound-table, .return-inbound-table tbody, .return-inbound-table tr, .return-inbound-table td {
    display: block;
    width: 100%;
  }

  .return-inbound-table tbody tr {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f2f5;
  }

  .return-inbound-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }

  .return-inbound-table td::before {
    flex: 0 0 auto;
    color: #94a0b0;
    content: attr(data-label);
    font-size: 11px;
    text-align: left;
  }
}

/* Return quality and match type ------------------------------------------- */

.return-list-table {
  min-width: 1600px;
}

.return-list-table col.return-col-check { width: 3%; }
.return-list-table col.return-col-no { width: 11%; }
.return-list-table col.return-col-owner { width: 9%; }
.return-list-table col.return-col-warehouse { width: 9%; }
.return-list-table col.return-col-tracking { width: 10%; }
.return-list-table col.return-col-type { width: 7%; }
.return-list-table col.return-col-match { width: 7%; }
.return-list-table col.return-col-product { width: 11%; }
.return-list-table col.return-col-qty { width: 4%; }
.return-list-table col.return-col-good { width: 4%; }
.return-list-table col.return-col-bad { width: 4%; }
.return-list-table col.return-col-status { width: 6%; }
.return-list-table col.return-col-source { width: 6%; }
.return-list-table col.return-col-actions { width: 9%; }

.return-match-tag {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
}

.return-match-tag.is-original {
  background: #edf8f1;
  color: #2f8b5d;
}

.return-match-tag.is-exchanged {
  background: #fff7e8;
  color: #a8751d;
}

.return-quality-num {
  color: #536175;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .return-list-table {
    min-width: 0;
  }
}

/* Return filters and registration time ------------------------------------ */

.return-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 28, 44, 0.022);
}

.return-filter-field label {
  display: block;
  margin-bottom: 6px;
  color: #6b7789;
  font-size: 11.5px;
  line-height: 17px;
}

.return-filter-field input,
.return-filter-field select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  outline: 0;
  background: #fafbfc;
  color: #354257;
  font-size: 12px;
}

.return-filter-field input:focus,
.return-filter-field select:focus {
  border-color: #9db4eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 95, 223, 0.08);
}

.return-date-range {
  display: flex;
  align-items: center;
  gap: 7px;
}

.return-date-range span {
  flex: 0 0 auto;
  color: #9aa4b2;
  font-size: 10.5px;
}

.return-filter-reset {
  height: 36px;
  padding: 0 13px;
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  background: #fff;
  color: #667286;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 18px;
  white-space: nowrap;
}

.return-filter-reset:hover {
  border-color: #b8c8e8;
  background: #f7f9fd;
  color: #315bc1;
}

.return-list-table {
  min-width: 1600px;
}

.return-list-table col.return-col-check { width: 3%; }
.return-list-table col.return-col-no { width: 10%; }
.return-list-table col.return-col-owner { width: 8%; }
.return-list-table col.return-col-warehouse { width: 8%; }
.return-list-table col.return-col-tracking { width: 10%; }
.return-list-table col.return-col-type { width: 6%; }
.return-list-table col.return-col-match { width: 6%; }
.return-list-table col.return-col-product { width: 9%; }
.return-list-table col.return-col-qty { width: 4%; }
.return-list-table col.return-col-good { width: 4%; }
.return-list-table col.return-col-bad { width: 4%; }
.return-list-table col.return-col-status { width: 6%; }
.return-list-table col.return-col-created { width: 9%; }
.return-list-table col.return-col-source { width: 6%; }
.return-list-table col.return-col-actions { width: 7%; }

.return-created-value {
  color: #718095;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .return-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .return-filter-reset {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .return-filters {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .return-filter-reset {
    grid-column: auto;
  }
}

.settings-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.return-shipping-hint {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: #8a96a8;
  font-size: 11px;
  line-height: 17px;
}

.return-original-summary {
  display: block;
  margin-top: 3px;
  color: #8a96a8;
  font-size: 10px;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-detail-page {
  max-width: 1280px;
  margin: 0 auto;
}

.quote-detail-heading {
  align-items: flex-start;
}

.quote-detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quote-detail-title-row .settings-title {
  margin: 0;
}

.quote-detail-page-body {
  display: grid;
  gap: 14px;
}

.quote-detail-page-body .detail-card {
  margin: 0;
}

.quote-detail-actions {
  margin-top: 14px;
}

@media (max-width: 760px) {
  .quote-detail-heading {
    flex-direction: column;
  }

  .quote-detail-heading .btn-page-action {
    width: 100%;
  }
}

/* Express fee quote editor ------------------------------------------------ */

.quote-express-list {
  display: grid;
  gap: 10px;
}

.quote-express-card {
  border: 1px solid #edf0f4;
  border-radius: 9px;
  background: #fbfcfe;
  padding: 12px;
}

.quote-express-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.quote-express-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  color: #7d8898;
  font-size: 10.5px;
  line-height: 15px;
}

.quote-express-field input,
.quote-express-field select {
  width: 100%;
  height: 34px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #e6eaf0;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: #344157;
  font-size: 11.5px;
}

.quote-express-field input:focus,
.quote-express-field select:focus {
  border-color: #9db4eb;
  box-shadow: 0 0 0 2px rgba(46, 95, 223, 0.07);
}

.quote-express-price {
  display: grid;
  grid-column: span 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-express-price--first {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-column: span 4;
}

.quote-express-remark {
  grid-column: span 2;
}

.quote-express-remove {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  border: 1px solid #f0d9d9;
  border-radius: 6px;
  background: #fff7f7;
  color: #ce5a5a;
  cursor: pointer;
}

.quote-express-remove svg {
  width: 15px;
  height: 15px;
}

.quote-multi-select {
  position: relative;
  min-width: 0;
}

.quote-multi-trigger {
  width: 100%;
  height: 34px;
  overflow: hidden;
  padding: 0 8px;
  border: 1px solid #e6eaf0;
  border-radius: 6px;
  background: #fff;
  color: #9aa5b4;
  cursor: pointer;
  font-size: 11px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-multi-trigger.has-value {
  color: #344157;
}

.quote-multi-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  width: max(100%, 210px);
  max-height: 230px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dfe6ef;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 49, 78, 0.12);
}

.quote-multi-option {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 5px;
  color: #4c5a6d;
  cursor: pointer;
  font-size: 11px;
  line-height: 18px;
}

.quote-multi-option:hover {
  background: #f3f7fd;
}

.quote-multi-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #315bc1;
}

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

  .quote-express-price,
  .quote-express-price--first,
  .quote-express-remark {
    grid-column: span 2;
  }

  .quote-express-price--first {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .quote-express-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quote-express-price,
  .quote-express-price--first,
  .quote-express-remark {
    grid-column: auto;
  }

  .quote-express-price,
  .quote-express-price--first {
    grid-template-columns: minmax(0, 1fr);
  }

  .quote-express-remove {
    justify-self: start;
  }
}

.quote-province-panel {
  width: min(480px, calc(100vw - 40px));
  padding: 0;
  overflow: hidden auto;
}

.quote-province-group {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  border-bottom: 1px solid #eef1f5;
}

.quote-province-group:last-child {
  border-bottom: 0;
}

.quote-province-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #eef1f5;
  background: #f7f9fc;
  color: #516079;
  font-size: 10.5px;
  font-weight: 600;
}

.quote-province-options {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  padding: 4px 6px;
}

.quote-province-options .quote-multi-option {
  min-width: 88px;
  padding: 3px 4px;
}

.quote-province-options .is-highlight > span {
  color: #d24c4c;
}

/* Express carrier price matrix ------------------------------------------- */

.quote-express-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.quote-express-tab {
  padding: 6px 12px;
  border: 1px solid #dfe6ef;
  border-radius: 6px;
  background: #fff;
  color: #5d6b7f;
  cursor: pointer;
  font-size: 11px;
}

.quote-express-tab.is-active {
  border-color: #315bc1;
  background: #eef4ff;
  color: #234fae;
  font-weight: 600;
}

.quote-express-carrier {
  display: grid;
  gap: 8px;
}

.quote-express-carrier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #2e3d53;
  font-size: 12px;
}

.quote-express-carrier-remove {
  color: #c35656;
}

.quote-input-table--express {
  min-width: 1240px;
}

.quote-input-table--express th,
.quote-input-table--express td {
  text-align: center;
}

.quote-input-table--express th:first-child,
.quote-input-table--express th:nth-child(2) {
  text-align: left;
}

.quote-input-table--express td:nth-child(2) {
  text-align: left;
}

.quote-input-table--express input {
  text-align: right;
}

.quote-express-zone-cell {
  width: 58px;
  background: #f8fafc !important;
  color: #5d6b7f;
  font-size: 11px;
  font-weight: 600;
  text-align: center !important;
  vertical-align: middle;
}

.quote-express-province-cell {
  width: 132px;
  color: #35445a;
  font-size: 11px;
  white-space: nowrap;
}

.quote-express-province-cell.is-highlight {
  color: #d24c4c;
  font-weight: 600;
}

.quote-express-empty {
  padding: 26px 16px;
  border: 1px dashed #dfe6ef;
  border-radius: 8px;
  background: #fbfcfe;
  color: #8a96a7;
  font-size: 11.5px;
  text-align: center;
}

.quote-detail-express-carrier {
  display: grid;
  gap: 8px;
}

.quote-detail-express-carrier + .quote-detail-express-carrier {
  margin-top: 16px;
}

.quote-detail-express-carrier h4 {
  margin: 0;
  color: #2e3d53;
  font-size: 12px;
  font-weight: 600;
}

.quote-detail-table--express {
  min-width: 1000px;
}

.quote-detail-table--express th,
.quote-detail-table--express td {
  text-align: center;
  white-space: nowrap;
}

.quote-detail-table--express th:first-child,
.quote-detail-table--express th:nth-child(2),
.quote-detail-table--express td:nth-child(2) {
  text-align: left;
}

/* Customer quote form/detail use the full content width ------------------ */

#customer-quote-form-view .form-page-heading,
#customer-quote-form-view .warehouse-form {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

#customer-quote-detail-view {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

#customer-quote-detail-view .warehouse-form {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

#customer-quote-detail-view .quote-detail-form .form-section {
  padding: 22px 24px;
}

#customer-quote-detail-view .quote-detail-form .detail-info-grid {
  margin: 0;
}

#customer-quote-detail-view .quote-detail-form .quote-detail-section {
  margin: 0;
}

#customer-quote-detail-view .quote-detail-form .quote-detail-table {
  width: 100%;
}

#customer-quote-detail-view .quote-detail-form .quote-review-card {
  border-bottom: 0;
}

#customer-quote-detail-view .quote-detail-form .detail-info-grid {
  padding: 4px 0 0;
}

#customer-quote-detail-view .quote-detail-form .quote-detail-section {
  padding: 0;
}

/* -------------------------------------------------------------------------- */
/* D1 轻量工作台                                                              */
/* 正文 13px / 行高 1.55 / 卡片间距 14px / 标题 24px                         */
/* -------------------------------------------------------------------------- */

:root {
  --sidebar: #ffffff;
  --canvas: #f6f8fb;
  --primary: #2f6fed;
  --primary-soft: #edf4ff;
  --sidebar-width: 246px;
  --topbar-height: 68px;
}

html body {
  font-size: 13px;
  line-height: 1.55;
}

.sidebar {
  border-right: 1px solid #e7ecf3;
  background: #fff;
}

.brand-title {
  color: #1e2d41;
}

.brand-subtitle {
  color: #8b97a8;
}

.nav-item,
.nav-parent {
  min-height: 37px;
  color: #5b6878;
  font-size: 12.5px;
}

.nav-item:hover {
  background: #f3f7fd;
}

.nav-item.is-active {
  background: #edf4ff;
  color: #215dcc;
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px solid #e9eef5;
  background: #f7f9fc;
  color: #5b6878;
}

.topbar {
  height: 68px;
  border-bottom: 1px solid #e9edf3;
  background: #fff;
}

.content {
  padding: 24px 28px;
  background: #f6f8fb;
}

.settings-heading {
  padding: 4px 0 16px;
}

.settings-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.015em;
}

.settings-subtitle {
  margin-top: 5px;
  color: #7b8798;
  font-size: 13px;
  line-height: 20px;
}

.settings-card {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(20, 32, 52, 0.035);
}

.settings-card + .settings-card,
.settings-card + .kpi-grid {
  margin-top: 14px;
}

.settings-card-toolbar {
  padding: 17px 20px;
}

.settings-card-title-group h3 {
  font-size: 15px;
}

.settings-card-title-group p {
  font-size: 12px;
}

.kpi-grid {
  gap: 14px;
}

.kpi-card {
  padding: 18px 20px;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(20, 32, 52, 0.03);
}

.kpi-label {
  font-size: 12px;
}

.kpi-value {
  font-size: 26px;
  line-height: 32px;
}

.kpi-foot {
  font-size: 11px;
}

table th {
  height: 36px;
  padding: 8px 10px;
  background: #f8fafc;
  font-size: 11px;
}

table td {
  padding: 10px;
  font-size: 12.5px;
  line-height: 19px;
}

.btn {
  height: 34px;
  border-radius: 7px;
  font-size: 12.5px;
}

.form-section {
  padding: 22px 24px;
}

.form-section-head h3 {
  font-size: 15.5px;
}

.form-section-head p {
  font-size: 12px;
}

.form-grid {
  gap: 17px 20px;
}

.field-control {
  height: 38px;
  font-size: 13px;
}

/* D1 占位页 --------------------------------------------------------------- */

.placeholder-page {
  max-width: 1080px;
  margin: 0 auto;
}

.placeholder-page-card {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px;
  text-align: center;
}

.placeholder-page-icon {
  display: flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
}

.placeholder-page-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.placeholder-page-badge {
  display: inline-flex;
  height: 24px;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff4e0;
  color: #b06d09;
  font-size: 11px;
}

.placeholder-page-card h3 {
  margin: 0 0 8px;
  color: var(--ink-strong);
  font-size: 22px;
}

.placeholder-page-card > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.placeholder-steps {
  display: flex;
  width: 100%;
  max-width: 660px;
  gap: 12px;
  margin-top: 26px;
}

.placeholder-step {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
}

.placeholder-step strong {
  color: var(--primary);
  font-size: 11px;
}

.placeholder-step span {
  color: var(--ink);
  font-size: 12px;
}

.placeholder-page-card .btn {
  margin-top: 26px;
}

@media (max-width: 760px) {
  .content {
    padding: 16px;
  }

  .placeholder-page-card {
    min-height: 360px;
    padding: 28px 18px;
  }

  .placeholder-steps {
    flex-direction: column;
  }
}

/* Quote configuration fields --------------------------------------------- */

.quote-list-table {
  min-width: 1720px;
}

.quote-list-table col.quote-col-check { width: 3%; }
.quote-list-table col.quote-col-no { width: 8.5%; }
.quote-list-table col.quote-col-customer { width: 10%; }
.quote-list-table col.quote-col-warehouse { width: 12%; }
.quote-list-table col.quote-col-carriers { width: 13%; }
.quote-list-table col.quote-col-submitter { width: 6.5%; }
.quote-list-table col.quote-col-approver { width: 6.5%; }
.quote-list-table col.quote-col-approval-time { width: 10%; }
.quote-list-table col.quote-col-status { width: 7%; }
.quote-list-table col.quote-col-active { width: 6%; }
.quote-list-table col.quote-col-date { width: 7.5%; }
.quote-list-table col.quote-col-valid { width: 7.5%; }
.quote-list-table col.quote-col-updated { width: 9%; }
.quote-list-table col.quote-col-actions { width: 9%; }

.quote-carriers-cell {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.quote-active-badge {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.quote-active-badge.is-enabled {
  background: #e8f5ec;
  color: #2f8b5d;
}

.quote-active-badge.is-disabled {
  background: #f1f3f6;
  color: #7c8798;
}

.quote-detail-active {
  width: 120px;
  height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.quote-detail-active:disabled {
  background: #f7f8fa;
  color: #7c8798;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .quote-list-table {
    min-width: 0;
  }
}

/* Manual quote import ----------------------------------------------------- */

.quote-import-modal {
  width: min(760px, calc(100vw - 40px));
  max-width: 760px;
}

.quote-import-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 8px;
}

.quote-import-file {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
}

.quote-import-file svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.quote-import-text {
  width: 100%;
  min-height: 260px;
  padding: 12px;
  border: 1px solid #e3e7ed;
  border-radius: 8px;
  outline: 0;
  background: #fbfcfd;
  color: #344157;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11.5px;
  line-height: 1.6;
  resize: vertical;
}

.quote-import-text:focus {
  border-color: #9db4eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 95, 223, 0.07);
}

.quote-import-error {
  min-height: 18px;
  margin: 4px 0 0;
}

/* Express weight ladder 1kg-20kg ---------------------------------------- */

.quote-input-table--express {
  min-width: 2760px;
}

.quote-input-table--express th,
.quote-input-table--express td {
  min-width: 78px;
}

.quote-input-table--express th:first-child,
.quote-input-table--express td:first-child {
  min-width: 58px;
}

.quote-input-table--express th:nth-child(2),
.quote-input-table--express td:nth-child(2) {
  min-width: 132px;
}

.quote-detail-table--express {
  min-width: 2480px;
}

.quote-input-table--express {
  min-width: 2300px;
}

.quote-detail-table--express {
  min-width: 2050px;
}

/* Historical customer bills ----------------------------------------------- */

.bill-list-table {
  min-width: 1080px;
  table-layout: fixed;
}

.bill-list-table th,
.bill-list-table td {
  text-align: left;
}

.bill-list-table th:nth-child(4),
.bill-list-table th:nth-child(5),
.bill-list-table th:nth-child(6),
.bill-list-table td:nth-child(4),
.bill-list-table td:nth-child(5),
.bill-list-table td:nth-child(6) {
  text-align: right;
}

.bill-list-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bill-status-badge {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.bill-status-badge.is-received {
  background: #e8f5ec;
  color: #2f8b5d;
}

.bill-status-badge.is-partial {
  background: #fff4e0;
  color: #b06d09;
}

.bill-status-badge.is-pending {
  background: #fdeeee;
  color: #c04c4c;
}

@media (max-width: 760px) {
  .bill-list-table {
    min-width: 0;
  }
}

/* Reconciliation bill ----------------------------------------------------- */

.reconciliation-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.reconciliation-stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  background: #f8fafc;
  color: #68768a;
  font-size: 12px;
}

.reconciliation-stats strong {
  color: #1f2d41;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.reconciliation-table {
  min-width: 980px;
}

.reconciliation-table th:nth-child(n + 3),
.reconciliation-table td:nth-child(n + 3) {
  text-align: right;
}

.reconciliation-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.reconciliation-error {
  color: #c04c4c;
  text-align: left !important;
  white-space: normal;
}

@media (max-width: 760px) {
  .reconciliation-stats {
    grid-template-columns: 1fr;
  }
}

.reconciliation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reconciliation-status {
  display: inline-flex;
  height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1f3f6;
  color: #7c8798;
  font-size: 11px;
  white-space: nowrap;
}

.reconciliation-status.is-started {
  background: #e8f5ec;
  color: #2f8b5d;
}

#reconciliation-save:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.reconciliation-table {
  min-width: 1280px;
}

.reconciliation-table th:nth-child(2),
.reconciliation-table td:nth-child(2) {
  min-width: 150px;
}

.reconciliation-table th:nth-child(3),
.reconciliation-table td:nth-child(3) {
  min-width: 240px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.reconciliation-table th:nth-child(2),
.reconciliation-table th:nth-child(3),
.reconciliation-table td:nth-child(2),
.reconciliation-table td:nth-child(3) {
  text-align: left;
}

.reconciliation-table th:nth-child(n + 4),
.reconciliation-table td:nth-child(n + 4) {
  text-align: right;
}

/* Save progress ----------------------------------------------------------- */

.save-progress {
  max-width: 1080px;
  margin: 14px auto 0;
  padding: 12px 14px;
  border: 1px solid #e3e9f2;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 32, 52, .035);
}

.save-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #536175;
  font-size: 12px;
}

.save-progress-head strong {
  color: #2f6fed;
  font-variant-numeric: tabular-nums;
}

.save-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f8;
}

.save-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #2f6fed;
  transition: width 220ms ease;
}

.save-progress.is-success .save-progress-head strong,
.save-progress.is-success .save-progress-head span {
  color: #2f8b5d;
}

.save-progress.is-success .save-progress-track i {
  background: #2f8b5d;
}

.save-progress.is-error .save-progress-head strong,
.save-progress.is-error .save-progress-head span {
  color: #c04c4c;
}

.save-progress.is-error .save-progress-track i {
  background: #c04c4c;
}

.bill-detail-modal {
  width: min(760px, calc(100vw - 40px));
  max-width: 760px;
}

.bill-detail-summary {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #edf0f4;
  border-radius: 7px;
  background: #f8fafc;
  color: #536175;
  font-size: 12px;
  line-height: 1.6;
}

.bill-row-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.bill-start-progress {
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 1px solid #e3e9f2;
  border-radius: 8px;
  background: #fbfcfe;
}

.bill-start-progress.is-success .save-progress-head strong,
.bill-start-progress.is-success .save-progress-head span { color: #2f8b5d; }
.bill-start-progress.is-success .save-progress-track i { background: #2f8b5d; }
.bill-start-progress.is-error .save-progress-head strong,
.bill-start-progress.is-error .save-progress-head span { color: #c04c4c; }
.bill-start-progress.is-error .save-progress-track i { background: #c04c4c; }

.bill-reconcile-result {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eef1f5;
}

.bill-reconcile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.bill-reconcile-stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  background: #f8fafc;
  color: #68768a;
  font-size: 12px;
}

.bill-reconcile-stats strong {
  color: #1f2d41;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.bill-failed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.bill-failed-head h3 {
  margin: 0;
  color: #202b3b;
  font-size: 14px;
}

.bill-failed-head p {
  margin: 3px 0 0;
  color: #8b95a5;
  font-size: 11.5px;
}

.bill-failed-table {
  min-width: 760px;
}

.bill-failed-table th,
.bill-failed-table td {
  text-align: left;
}

.bill-failed-empty {
  margin: 6px 0 0;
  color: #8b95a5;
  font-size: 12px;
}

@media (max-width: 760px) {
  .bill-reconcile-stats {
    grid-template-columns: 1fr;
  }
}

.bill-failed-check-head,
.bill-failed-check-cell {
  width: 38px;
  text-align: center !important;
}

.bill-failed-check-cell input {
  width: 14px;
  height: 14px;
  accent-color: #2f6fed;
}

.bill-check-head,
.bill-check-cell {
  width: 38px;
  text-align: center !important;
}

.bill-check-cell input {
  width: 14px;
  height: 14px;
  accent-color: #2f6fed;
}

.bill-paid-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bill-paid-input .field-control {
  flex: 1;
}

.bill-payment-add {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: #f5f8fd;
  color: #2f6fed;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.bill-payment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.bill-payment-head span {
  color: #929dab;
  font-size: 10.5px;
}

.bill-payment-editor {
  display: grid;
  grid-template-columns: 1.2fr .8fr auto auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #fbfcfe;
}

.bill-payment-file {
  display: inline-flex;
  height: 34px;
  align-items: center;
  padding: 0 10px;
  border: 1px dashed #cfd9e6;
  border-radius: 7px;
  color: #5d6b7f;
  cursor: pointer;
  font-size: 11.5px;
  white-space: nowrap;
}

.bill-payment-table {
  min-width: 650px;
}

.bill-payment-table th:nth-child(2),
.bill-payment-table td:nth-child(2) {
  text-align: right;
}

.bill-payment-voucher-link {
  color: #2f6fed;
  text-decoration: underline;
  cursor: pointer;
}

.bill-payment-remove {
  color: #c04c4c;
  background: none;
  border: 0;
  cursor: pointer;
}

.bill-payment-empty {
  margin: 2px 0 0;
  color: #929dab;
  font-size: 11.5px;
}

@media (max-width: 760px) {
  .bill-payment-editor {
    grid-template-columns: 1fr;
  }
}

/* Alert center ----------------------------------------------------------- */

.alert-center {
  position: relative;
}

.alert-bell {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  background: #fff;
  color: #5b6878;
  cursor: pointer;
}

.alert-bell svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.alert-bell:hover {
  border-color: #b9c9e8;
  color: #2f6fed;
}

.alert-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #d93838;
}

.alert-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  overflow: hidden;
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(20, 32, 52, 0.16);
}

.alert-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #eef1f5;
}

.alert-panel-head strong {
  color: #1f2d41;
  font-size: 13px;
}

.alert-mark-read {
  border: 0;
  background: transparent;
  color: #2f6fed;
  cursor: pointer;
  font-size: 11.5px;
}

.alert-list {
  max-height: 360px;
  overflow-y: auto;
}

.alert-item {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f3f6;
}

.alert-item:last-child {
  border-bottom: 0;
}

.alert-item-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #263246;
  font-size: 12px;
  font-weight: 600;
}

.alert-item-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #c8890e;
}

.alert-item.is-critical .alert-item-dot {
  background: #d93838;
}

.alert-item.is-info .alert-item-dot {
  background: #2f6fed;
}

.alert-item-message {
  margin: 4px 0 0 14px;
  color: #69768a;
  font-size: 11.5px;
  line-height: 1.55;
}

.alert-item-time {
  margin: 4px 0 0 14px;
  color: #9aa5b4;
  font-size: 10.5px;
}

.alert-empty {
  padding: 28px 14px;
  color: #9aa5b4;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 760px) {
  .alert-panel {
    position: fixed;
    top: 64px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

.bill-items-modal {
  width: min(1200px, calc(100vw - 40px));
  max-width: 1200px;
}

.bill-items-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
}

.bill-items-toolbar .table-search {
  flex: 1;
}

.bill-items-toolbar > span {
  color: #7c8798;
  font-size: 11.5px;
  white-space: nowrap;
}

.bill-items-wrap {
  max-height: 56vh;
  overflow: auto;
}

.bill-items-table {
  min-width: 1100px;
}

.bill-items-table th:nth-child(n + 4),
.bill-items-table td:nth-child(n + 4) {
  text-align: right;
}

.bill-items-actions {
  justify-content: flex-end;
}

/* Manual bill items secondary page --------------------------------------- */

.bill-items-back {
  display: inline-block;
  margin-bottom: 6px;
  color: #7c8798;
  font-size: 11.5px;
  text-decoration: none;
}

.bill-items-back:hover {
  color: #2f6fed;
}

.bill-items-summary {
  display: grid;
  grid-template-columns: 1.4fr .8fr 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.bill-items-summary-card {
  padding: 12px 14px;
  border: 1px solid #e8edf3;
  border-radius: 9px;
  background: #fff;
}

.bill-items-summary-card span {
  display: block;
  margin-bottom: 5px;
  color: #8b95a5;
  font-size: 11px;
}

.bill-items-summary-card strong {
  color: #223047;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.bill-items-summary-card.is-danger strong {
  color: #c04c4c;
}

.bill-items-page-toolbar {
  align-items: center;
  gap: 12px;
}

.bill-items-page-toolbar .quote-toolbar-actions {
  flex-wrap: wrap;
}

.bill-items-filter {
  width: 130px;
  min-width: 110px;
}

.bill-items-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5d6b7f;
  font-size: 11.5px;
  white-space: nowrap;
}

.bill-items-check input {
  accent-color: #2f6fed;
}

.bill-items-batch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #dce6f7;
  border-radius: 8px;
  background: #f7faff;
  color: #5d6b7f;
  font-size: 11.5px;
  white-space: nowrap;
}

.bill-items-batch .field-control {
  width: 100px;
  height: 30px;
}

.bill-items-page-wrap {
  max-height: 58vh;
  overflow: auto;
}

.bill-items-page-table {
  min-width: 1150px;
}

.bill-items-page-table th:nth-child(n + 5),
.bill-items-page-table td:nth-child(n + 5) {
  text-align: right;
}

.bill-items-price-input {
  width: 82px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #d8e1ed;
  border-radius: 6px;
  color: #223047;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.bill-items-price-input:focus {
  border-color: #2f6fed;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(47, 111, 237, .1);
}

.bill-items-price-readonly {
  color: #3e4c60;
  font-variant-numeric: tabular-nums;
}

.bill-items-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  color: #7c8798;
  font-size: 11.5px;
}

.bill-items-pagination > div {
  display: flex;
  gap: 8px;
}

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

  .bill-items-page-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

.bill-items-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 2px 0 12px;
  border-bottom: 1px solid #e9eef5;
}

.bill-items-tab {
  position: relative;
  padding: 8px 14px 9px;
  border: 0;
  background: transparent;
  color: #7b8798;
  cursor: pointer;
  font-size: 12px;
}

.bill-items-tab:hover {
  color: #2f6fed;
}

.bill-items-tab.is-active {
  color: #1f2d41;
  font-weight: 600;
}

.bill-items-tab.is-active::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  border-radius: 2px;
  background: #2f6fed;
  content: "";
}

.bill-items-other-panel {
  min-height: 260px;
}

/* Bill summary tab ------------------------------------------------------- */

.bill-summary-panel {
  padding: 4px 2px 8px;
}

.bill-summary-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.bill-summary-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.bill-summary-brand strong {
  display: block;
  color: #1f2d41;
  font-size: 15px;
}

.bill-summary-brand span {
  display: block;
  margin-top: 2px;
  color: #8b95a5;
  font-size: 11px;
}

.bill-summary-meta {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.bill-summary-meta > div {
  padding: 10px 12px;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  background: #fbfcfe;
}

.bill-summary-meta span,
.bill-summary-fee span,
.bill-summary-totals span {
  display: block;
  color: #8b95a5;
  font-size: 11px;
}

.bill-summary-meta strong {
  display: block;
  margin-top: 5px;
  color: #223047;
  font-size: 14px;
}

.bill-summary-fees {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.bill-summary-fee {
  padding: 10px 12px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  background: #fff;
}

.bill-summary-fee strong {
  display: block;
  margin-top: 5px;
  color: #263246;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.bill-summary-fee.is-deduction strong {
  color: #c04c4c;
}

.bill-summary-totals {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #edf1f6;
}

.bill-summary-totals > div {
  padding: 12px 14px;
  border-radius: 8px;
  background: #f7f9fc;
}

.bill-summary-totals > .bill-summary-total-main {
  background: #f0f5ff;
}

.bill-summary-totals strong {
  display: block;
  margin-top: 5px;
  color: #1f2d41;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.bill-summary-totals .is-danger strong {
  color: #c04c4c;
}

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

  .bill-summary-totals {
    grid-template-columns: 1fr;
  }

  .bill-summary-meta {
    grid-template-columns: 1fr;
  }
}

.bill-items-generic-panel {
  padding-top: 2px;
}

.bill-items-generic-table {
  min-width: 800px;
}

.bill-items-generic-table th:nth-child(n + 4),
.bill-items-generic-table td:nth-child(n + 4) {
  text-align: right;
}

.bill-items-generic-empty {
  padding: 24px 0;
  color: #8b95a5;
  font-size: 12px;
  text-align: center;
}

.bill-fee-import-modal {
  width: min(960px, calc(100vw - 36px));
  max-width: 960px;
}

.bill-fee-import-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 10px;
}

.bill-fee-import-toolbar > span {
  color: #8b95a5;
  font-size: 11px;
}

.bill-fee-file-label {
  cursor: pointer;
}

.bill-fee-import-text {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
}

.bill-fee-import-preview {
  margin-top: 10px;
}

.bill-fee-import-preview > p {
  margin: 0 0 6px;
  color: #7c8798;
  font-size: 11.5px;
}

.bill-fee-import-preview .table-wrap {
  max-height: 220px;
}

.bill-fee-preview-table {
  min-width: 720px;
  font-size: 11.5px;
}

.bill-fee-import-error {
  min-height: 16px;
  margin: 8px 0 0;
  color: #c04c4c;
  font-size: 11.5px;
}

/* Import modal readability ------------------------------------------------ */

.bill-fee-import-modal {
  max-height: min(86vh, 900px);
  overflow-y: auto;
}

.bill-fee-import-fields {
  margin: 8px 0 2px;
  padding: 8px 10px;
  border: 1px solid #e8eef6;
  border-radius: 8px;
  background: #fbfcfe;
}

.bill-fee-import-fields summary {
  color: #52637a;
  cursor: pointer;
  font-size: 11.5px;
  user-select: none;
}

.bill-fee-import-field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 92px;
  margin-top: 8px;
  overflow-y: auto;
}

.bill-fee-import-field-list span {
  padding: 3px 7px;
  border: 1px solid #dfe8f3;
  border-radius: 5px;
  background: #fff;
  color: #5d6b7f;
  font-size: 10.5px;
  white-space: nowrap;
}

.bill-items-generic-table {
  width: max-content;
  min-width: 100%;
}

.bill-items-generic-table th,
.bill-items-generic-table td {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bill-items-generic-table th:first-child,
.bill-items-generic-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 1px 0 0 #eef1f5;
}

.bill-items-generic-table th:first-child {
  background: #f7f9fc;
}

.bill-fee-preview-table {
  width: max-content;
  min-width: 100%;
}

.bill-fee-preview-table th,
.bill-fee-preview-table td {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bill-items-danger-btn {
  border-color: #f0d5d5;
  color: #c04c4c;
}

.bill-items-danger-btn:hover {
  border-color: #d9a5a5;
  background: #fff7f7;
}

.bill-items-delete {
  padding: 0;
  border: 0;
  background: transparent;
  color: #c04c4c;
  cursor: pointer;
  font-size: 11.5px;
}

.bill-items-delete:hover {
  text-decoration: underline;
}

.bill-fee-reset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px;
}

.bill-fee-reset-row > span {
  color: #9a6a6a;
  font-size: 10.5px;
}

.bill-items-generic-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #7c8798;
  font-size: 11.5px;
}

.bill-items-generic-actions strong {
  color: #223047;
}

/* Freeze fee table headers and center all cells ------------------------- */

.bill-items-page-wrap,
.bill-fee-import-preview .table-wrap {
  position: relative;
}

.bill-items-page-wrap thead th,
.bill-fee-import-preview .table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f7f9fc;
  text-align: center !important;
  box-shadow: inset 0 -1px 0 #e6ebf2;
}

.bill-items-page-table th,
.bill-items-page-table td,
.bill-items-generic-table th,
.bill-items-generic-table td,
.bill-fee-preview-table th,
.bill-fee-preview-table td {
  text-align: center !important;
}

.bill-items-page-table td.num,
.bill-items-generic-table td.num,
.bill-fee-preview-table td.num {
  text-align: center !important;
}

.bill-items-page-table .bill-items-price-input {
  text-align: center;
}

.bill-items-generic-table thead th:first-child {
  left: 0;
  z-index: 4;
}

.bill-items-generic-table tbody td:first-child {
  z-index: 1;
}

.bill-items-cell-input {
  width: 76px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #d8e1ed;
  border-radius: 6px;
  color: #223047;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.bill-items-cell-input:focus {
  border-color: #2f6fed;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(47, 111, 237, .1);
}

.bill-items-merged-cell {
  background: #fbfcfe;
  font-weight: 600;
  vertical-align: middle !important;
}

.bill-items-merged-cell {
  background: #fbfcfe;
  font-weight: 600;
  vertical-align: middle !important;
}

.value-added-entry {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e6ecf4;
  border-radius: 9px;
  background: #fbfcfe;
}

.value-added-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.value-added-entry-head strong {
  color: #223047;
  font-size: 12.5px;
}

.value-added-entry-head span {
  color: #8b95a5;
  font-size: 10.5px;
}

.value-added-entry-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr .7fr .7fr .9fr auto;
  gap: 8px;
  align-items: end;
}

.value-added-entry-grid label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.value-added-entry-grid label > span {
  color: #7c8798;
  font-size: 10.5px;
}

.value-added-entry-grid .field-control {
  height: 32px;
}

@media (max-width: 900px) {
  .value-added-entry-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.bill-items-total-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 4px 2px;
  color: #7c8798;
  font-size: 12px;
}

.bill-items-total-line strong {
  color: #1f2d41;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.bill-b2c-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid #e7edf5;
  border-radius: 8px;
  background: #fbfcfe;
}

.bill-b2c-toolbar .table-search {
  flex: 1 1 260px;
}

.bill-b2c-toolbar .field-control {
  width: auto;
  min-width: 118px;
  height: 32px;
}

.bill-b2c-toolbar #bill-b2c-batch-value {
  width: 110px;
}

/* B2C 2000-row pages: defer offscreen row rendering. */
#bill-items-generic-body tr {
  content-visibility: auto;
  contain-intrinsic-size: 38px;
}

.bill-b2c-selected {
  color: #7c8798;
  font-size: 11px;
  white-space: nowrap;
}

.bill-items-table td.bill-items-inline-editable {
  cursor: text;
  outline: none;
}

.bill-items-table td.bill-items-inline-editable:focus {
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #f0a04b;
}

.bill-items-table th.bill-items-resizable {
  position: relative;
  padding-right: 14px;
}

.bill-items-col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}

.bill-items-col-resizer::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 3px;
  width: 1px;
  background: #d6deeb;
}

.bill-items-col-resizer:hover::after,
.bill-items-col-resizer:active::after {
  background: #2f6fed;
}

.bill-b2c-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.bill-b2c-filter-row #bill-b2c-filter-field {
  flex: 0 0 190px;
}

.bill-b2c-filter-row #bill-b2c-filter-select,
.bill-b2c-filter-row #bill-b2c-filter-input {
  flex: 1 1 auto;
  min-width: 160px;
}

.bill-b2c-filter-row #bill-b2c-query {
  flex: 0 0 96px;
}

.bill-b2c-batch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.bill-b2c-batch-row #bill-b2c-batch-field {
  flex: 0 0 170px;
}

.bill-b2c-batch-row #bill-b2c-batch-value {
  flex: 1 1 auto;
  min-width: 140px;
}

.bill-b2c-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.bill-b2c-filter-row .field-control,
.bill-b2c-batch-row .field-control {
  width: auto;
  min-width: 0;
  height: 32px;
}

.bill-b2c-batch-row #bill-b2c-batch-value {
  width: auto;
}

.bill-b2c-toolbar {
  display: grid;
  grid-template-columns:
    160px minmax(170px, 1fr) 88px
    160px minmax(170px, 1fr)
    auto auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.bill-b2c-toolbar > .field-control {
  width: 100%;
  min-width: 0;
  height: 32px;
}

.bill-b2c-toolbar > #bill-b2c-query {
  width: 100%;
}

.bill-b2c-toolbar > .bill-b2c-selected {
  white-space: nowrap;
  text-align: right;
}

.bill-b2c-toolbar > #bill-b2c-filter-field { grid-column: 1; }
.bill-b2c-toolbar > #bill-b2c-filter-select,
.bill-b2c-toolbar > #bill-b2c-filter-input { grid-column: 2; }
.bill-b2c-toolbar > #bill-b2c-query { grid-column: 3; }
.bill-b2c-toolbar > #bill-b2c-batch-field { grid-column: 4; }
.bill-b2c-toolbar > #bill-b2c-batch-value { grid-column: 5; }
.bill-b2c-toolbar > #bill-b2c-selected-count { grid-column: 6; }
.bill-b2c-toolbar > #bill-b2c-batch-apply { grid-column: 7; }
.bill-b2c-toolbar > #bill-b2c-operation-logs { grid-column: 8; }

@media (max-width: 1100px) {
  .bill-b2c-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .bill-b2c-toolbar > #bill-b2c-filter-field { grid-column: 1; }
  .bill-b2c-toolbar > #bill-b2c-filter-select,
  .bill-b2c-toolbar > #bill-b2c-filter-input { grid-column: 2; }
  .bill-b2c-toolbar > #bill-b2c-query { grid-column: 1; }
  .bill-b2c-toolbar > #bill-b2c-batch-field { grid-column: 2; }
  .bill-b2c-toolbar > #bill-b2c-batch-value { grid-column: 1; }
  .bill-b2c-toolbar > #bill-b2c-selected-count { grid-column: 2; }
  .bill-b2c-toolbar > #bill-b2c-batch-apply { grid-column: 1; }
  .bill-b2c-toolbar > #bill-b2c-operation-logs { grid-column: 2; }
}

.quote-input-table--packaging {
  min-width: 760px;
}

@media (max-width: 900px) {
  .quote-input-table--packaging {
    min-width: 680px;
  }
}

.quote-input-table--packaging th:nth-child(3),
.quote-input-table--packaging td:nth-child(3) {
  text-align: center;
}

.quote-input-table--packaging td:nth-child(3) input {
  text-align: center;
}

.quote-input-table--express td:nth-child(3) input {
  text-align: center;
}

.quote-input-table--express input {
  text-align: center;
}

.quote-detail-table--express td.num {
  text-align: center;
}

#quote-detail-packaging .quote-detail-table th:nth-child(3),
#quote-detail-packaging .quote-detail-table td:nth-child(3),
#quote-detail-packaging .quote-detail-table td.num {
  text-align: center;
}

.quote-input-table--express th:nth-child(2),
.quote-input-table--express td:nth-child(2),
.quote-detail-table--express th:nth-child(2),
.quote-detail-table--express td:nth-child(2) {
  text-align: center;
}

.bill-b2c-toolbar > #bill-b2c-batch-value {
  width: 100%;
  min-width: 0;
}

.sidebar .nav-subparent {
  height: 37px;
  color: #5b6878;
  font-size: 12.5px;
  font-weight: 500;
}

.sidebar .nav-subparent:hover {
  background: #f3f7fd;
  color: #215dcc;
}

.sidebar .nav-subparent .nav-child-chevron {
  color: #8b97a8;
}

/* Unified D1 sidebar typography and colors */
.sidebar .nav-item,
.sidebar .nav-parent,
.sidebar .nav-subparent,
.sidebar .nav-child,
.sidebar .nav-grandchild {
  color: #5b6878;
  font-size: 12.5px;
}

.sidebar .nav-icon,
.sidebar .nav-icon svg {
  color: #7c8798;
}

.sidebar .nav-chevron,
.sidebar .nav-child-chevron {
  color: #8b97a8;
}

.sidebar .nav-item:hover,
.sidebar .nav-parent:hover,
.sidebar .nav-subparent:hover,
.sidebar .nav-child:hover,
.sidebar .nav-grandchild:hover {
  background: #f3f7fd;
  color: #215dcc;
}

.sidebar .nav-item.is-active,
.sidebar .nav-child.is-active,
.sidebar .nav-grandchild.is-active {
  background: #edf4ff;
  color: #215dcc;
  font-weight: 600;
}

.sidebar .nav-parent[aria-expanded="true"] {
  color: #344157;
}

.material-cost-picker-modal {
  width: min(820px, calc(100vw - 32px));
}

.material-cost-picker-toolbar {
  padding: 4px 0 12px;
}

.material-cost-picker-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #e8edf4;
  border-radius: 8px;
}

.material-cost-picker-wrap .quote-list-table {
  min-width: 680px;
}

#material-cost-picker .modal-actions {
  padding-top: 14px;
}


.quote-input-table--packaging th:nth-child(5),
.quote-input-table--packaging td:nth-child(5),
.quote-input-table--packaging td:nth-child(5) input {
  text-align: center;
}

#quote-detail-packaging .quote-detail-table th:nth-child(5),
#quote-detail-packaging .quote-detail-table td:nth-child(5),
#quote-detail-packaging .quote-detail-table td.num {
  text-align: center;
}

.quote-input-table--packaging th:nth-child(4),
.quote-input-table--packaging td:nth-child(4),
.quote-input-table--packaging td:nth-child(4) input,
#quote-detail-packaging .quote-detail-table th:nth-child(4),
#quote-detail-packaging .quote-detail-table td:nth-child(4) {
  text-align: center;
}

.material-cost-picker-quote {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 2px;
}

.material-cost-picker-quote label {
  color: #5b6878;
  font-size: 11.5px;
  white-space: nowrap;
}

.material-cost-picker-quote label em {
  color: #c35656;
  font-style: normal;
}

.material-cost-picker-quote input {
  max-width: 240px;
}

.material-cost-picker-modal {
  width: min(980px, calc(100vw - 32px));
}

.material-cost-picker-pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 0 2px;
}

.material-cost-percent-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5b6878;
  font-size: 11.5px;
}

.material-cost-percent-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5b6878;
  font-size: 11.5px;
}

.material-cost-percent-value input {
  width: 90px;
  height: 32px;
}

.material-cost-picker-wrap .quote-list-table {
  min-width: 900px;
}


.brand-mark img {
  object-fit: contain;
  padding: 3px;
}

.arrival-products-field {
  margin-bottom: 14px;
}

.arrival-products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.arrival-products-head .field-label {
  margin: 0;
}

.arrival-product-wrap {
  border: 1px solid #e8edf4;
  border-radius: 8px;
  overflow-x: auto;
}

.arrival-product-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.arrival-product-table th {
  padding: 7px 6px;
  background: #f8f9fc;
  color: #7d8898;
  font-size: 10.5px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.arrival-product-table td {
  padding: 5px 4px;
  border-top: 1px solid #f0f3f7;
}

.arrival-product-table td:first-child {
  width: 46px;
  color: #8a95a5;
  text-align: center;
}

.arrival-product-table input,
.arrival-product-table select {
  width: 100%;
  height: 30px;
  min-width: 0;
  padding: 0 6px;
  border: 1px solid #e6eaf0;
  border-radius: 5px;
  outline: 0;
  background: #fbfcfd;
  color: #344157;
  font-size: 11px;
}

.arrival-product-table input:focus,
.arrival-product-table select:focus {
  border-color: #9db4eb;
  background: #fff;
}

.arrival-product-table .arrival-product-expiry {
  background: #f7f9fc;
  color: #5b6878;
}

.arrival-product-remove {
  width: 26px;
  height: 26px;
  margin: 0 auto;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #c35656;
  cursor: pointer;
}

.arrival-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.arrival-check-head,
.arrival-check-cell {
  width: 38px;
  text-align: center !important;
}

.arrival-check-cell input {
  width: 14px;
  height: 14px;
  accent-color: #2f6fed;
}

.arrival-product-table {
  min-width: 1080px;
}

/* 利润测算 */
.profit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.profit-module {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px;
  border: 1px solid #e2e9f3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(31, 43, 61, 0.05);
}

.profit-module-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef2f7;
}

.profit-module-index {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef3ff;
  color: #2f5fdf;
  font-size: 11px;
  font-weight: 700;
}

.profit-module-head h3 {
  margin: 0;
  color: #26364a;
  font-size: 18px;
  font-weight: 700;
}

.profit-module-head p {
  margin: 4px 0 0;
  color: #8b96a7;
  font-size: 12px;
}

.profit-fields {
  display: grid;
  gap: 12px;
  padding: 18px 0;
}

.profit-field {
  display: grid;
  gap: 6px;
}

.profit-field > span {
  color: #5b6878;
  font-size: 12px;
}

.profit-input {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #fbfcfe;
}

.profit-input:focus-within {
  border-color: #2f6fed;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.1);
}

.profit-input b {
  flex: none;
  color: #8b96a7;
  font-size: 12px;
  font-weight: 500;
}

.profit-input input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #26364a;
  font-size: 14px;
}

.profit-module-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}

.profit-module-total span {
  color: #6d7a8c;
  font-size: 12px;
}

.profit-module-total strong {
  color: #1f4f8f;
  font-size: 22px;
  font-weight: 700;
}

.profit-module-quote .profit-module-total strong {
  color: #2f6fed;
}

.profit-hint {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #f6f8fb;
  color: #8b96a7;
  font-size: 11px;
}

.profit-module-result {
  border-color: #dfe8f6;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 52%);
}

.profit-result-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 0 18px;
}

.profit-result-main span {
  color: #7c8798;
  font-size: 12px;
}

.profit-result-main strong {
  margin-top: 6px;
  color: #16845d;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profit-result-main strong.is-loss,
.profit-metrics strong.is-loss {
  color: #c44a4a;
}

.profit-result-main em {
  margin-top: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #16845d;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.profit-result-main em[data-status="loss"] {
  background: #fcecec;
  color: #c44a4a;
}

.profit-result-main em[data-status="even"] {
  background: #f1f4f8;
  color: #7c8798;
}

.profit-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid #e4ebf4;
  border-radius: 9px;
  background: #fff;
}

.profit-metrics div {
  padding: 12px;
}

.profit-metrics div + div {
  border-left: 1px solid #e4ebf4;
}

.profit-metrics span {
  display: block;
  color: #8b96a7;
  font-size: 11px;
}

.profit-metrics strong {
  display: block;
  margin-top: 4px;
  color: #26364a;
  font-size: 18px;
  font-weight: 700;
}

.profit-formula {
  margin-top: 16px;
  color: #9aa5b4;
  font-size: 11px;
  text-align: right;
}

@media (max-width: 1180px) {
  .profit-grid {
    grid-template-columns: 1fr;
  }

  .profit-module {
    padding: 18px;
  }
}
