:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f0f1f3;
  --ink: #05080d;
  --muted: #5f6874;
  --line: #e1e4e8;
  --blue: #0068d9;
  --blue-dark: #004fa8;
  --green: #1f8a70;
  --amber: #e0a400;
  --coral: #d62f2f;
  --violet: #6a3dff;
  --brand: #e6a51a;
  --shadow: 0 18px 45px rgba(38, 52, 66, 0.12);
  --radius: 8px;
  --font-sans: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui,
    -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-scale: 0.8334;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: calc(16px * var(--font-scale));
  font-weight: 400;
  line-height: 1.35;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

strong,
b {
  font-weight: 700;
}

input[type="date"].date-empty {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='16' viewBox='0 0 96 16'%3E%3Ctext x='0' y='12' fill='%2305080d' font-family='Segoe UI, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif' font-size='13' font-weight='700'%3EYYYY-MM-DD%3C/text%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 10px 50% !important;
  background-size: 96px 16px !important;
}

input[type="date"].date-empty::-webkit-datetime-edit {
  color: transparent;
}

input[type="date"].date-empty:disabled {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='16' viewBox='0 0 96 16'%3E%3Ctext x='0' y='12' fill='%235f6874' font-family='Segoe UI, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif' font-size='13' font-weight='700'%3EYYYY-MM-DD%3C/text%3E%3C/svg%3E") !important;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-sprite {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 8px 8px;
  background: #ededee;
  color: var(--ink);
  border-right: 1px solid #dedfe2;
  overflow: hidden;
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 8px 4px;
}

.brand strong {
  display: block;
  color: #050505;
  font-size: calc(28px * var(--font-scale));
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.brand-logo {
  display: block;
  width: 62px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.nav-list {
  flex: 1 1 auto;
  display: grid;
  gap: 9px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.nav-section {
  display: grid;
  gap: 2px;
}

.nav-section-title {
  display: block;
  padding: 0 2px 6px;
  color: #2a3440;
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 31px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #080b10;
  font-size: calc(16px * var(--font-scale));
  font-weight: 400;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: #f7f7f8;
  color: #000000;
}

.nav-item:hover,
.nav-item:focus-visible {
  z-index: 30;
}

.nav-item[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  box-sizing: border-box;
  left: 8px;
  top: calc(100% + 6px);
  z-index: 20;
  width: min(210px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid #d8dde5;
  border-radius: 7px;
  background: #ffffff;
  color: #202936;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  font-size: calc(15px * var(--font-scale));
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.nav-item[data-tooltip]:hover::after,
.nav-item[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.sidebar-footer {
  margin-top: auto;
  padding: 8px 10px 0;
  border-top: 1px solid #dedfe2;
  color: #77808c;
  font-size: calc(14px * var(--font-scale));
}

.workspace {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  overflow-x: hidden;
  padding: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.topbar-title {
  flex: 1;
  font-size: calc(16px * var(--font-scale));
  font-weight: 500;
}

.menu-button,
.user-menu {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 150px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.role-toggle button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.role-toggle button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(23, 32, 38, 0.08);
}

.server-auth .role-toggle {
  display: none;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f7f8fa;
}

.auth-card {
  width: min(100%, 390px);
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-logo {
  width: 72px;
  height: auto;
  justify-self: center;
}

.auth-card h1 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
  text-align: center;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.auth-card label {
  display: grid;
  gap: 6px;
  color: #2f3a45;
  font-weight: 600;
}

.auth-card input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
}

.auth-error {
  min-height: 18px;
  color: var(--coral);
  font-size: calc(14px * var(--font-scale));
  text-align: center;
}

.panel h2 {
  margin: 0;
}

.page-view {
  display: none;
  min-width: 0;
  padding: 16px 28px 22px;
}

.page-view.active {
  display: grid;
  gap: 14px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.page-heading h1 {
  margin: 0;
  font-size: calc(30px * var(--font-scale));
  line-height: 1.1;
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: calc(16px * var(--font-scale));
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.search-box {
  display: grid;
  grid-template-columns: 20px minmax(180px, 280px);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.search-box input,
.search-box input:focus {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 154px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.segmented button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(23, 32, 38, 0.08);
}

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

.status-summary-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}

.status-card {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 102px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.status-card:hover,
.status-card.active {
  border-color: currentColor;
  box-shadow: inset 0 0 0 1px currentColor;
}

.status-card span {
  min-height: 28px;
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
  overflow-wrap: anywhere;
}

.status-card strong {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 8px;
  color: var(--ink);
  font-size: calc(24px * var(--font-scale));
  line-height: 1;
}

.status-card small {
  color: var(--muted);
  font-size: calc(14px * var(--font-scale));
  font-weight: 500;
}

.tone-pending {
  color: #14213d;
}

.tone-production {
  color: #d65f00;
}

.tone-inspection {
  color: #0047ff;
}

.tone-ready,
.tone-delivered {
  color: #00835d;
}

.tone-assigned {
  color: #0072b2;
}

.tone-sailing {
  color: #6f2cff;
}

.tone-arrived {
  color: #007a5a;
}

.tone-cancelled {
  color: #d0003f;
}

.metric-tile {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.metric-tile span,
.metric-tile small {
  color: var(--muted);
}

.metric-tile strong {
  display: block;
  margin: 12px 0 8px;
  font-size: calc(30px * var(--font-scale));
  line-height: 1;
}

.accent-blue {
  border-top: 4px solid var(--blue);
}

.accent-green {
  border-top: 4px solid var(--green);
}

.accent-amber {
  border-top: 4px solid var(--amber);
}

.accent-coral {
  border-top: 4px solid var(--coral);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

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

#purchaseOrdersPage .editor-panel {
  display: none;
}

#purchaseOrdersPage.maintain-open .po-main-grid {
  grid-template-columns: minmax(0, 1fr) 420px;
}

#purchaseOrdersPage.maintain-open .editor-panel {
  display: block;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 108px);
  overflow: auto;
}

.lower-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(38, 52, 66, 0.06);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-header.compact {
  padding-bottom: 14px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-row.full {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.icon-button {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.text-button {
  padding: 0 12px;
}

.full-width-button {
  width: 100%;
}

.form-action-field {
  display: grid;
  align-self: stretch;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.form-action-field > span {
  font-size: calc(13px * var(--font-scale));
  line-height: 1.2;
}

.form-action-field .icon-button {
  min-height: 48px;
}

.price-check-field {
  min-width: 0;
  align-self: start;
}

.price-check-control {
  display: grid;
  grid-template-columns: 124px 70px;
  gap: 14px;
  align-items: start;
  width: 208px;
  max-width: 208px;
  padding-bottom: 18px;
}

.price-check-control .icon-button {
  width: 70px;
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
}

.price-check-result {
  display: grid;
  position: relative;
  width: 124px;
  min-width: 124px;
  max-width: 124px;
  gap: 4px;
}

.price-check-output {
  width: 124px;
  min-width: 124px;
  max-width: 124px;
  min-height: 40px;
  padding: 0 9px;
  box-sizing: border-box;
  color: var(--ink);
  font: inherit;
  font-size: calc(14px * var(--font-scale));
  font-weight: 700;
}

.price-check-output::placeholder {
  color: #78838f;
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.price-check-result small {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  color: var(--muted);
  font-size: calc(10px * var(--font-scale));
  font-weight: 700;
  line-height: 1.25;
  min-height: 13px;
  width: max-content;
  max-width: 230px;
  white-space: nowrap;
  overflow: visible;
}

.readonly-price-check-field {
  width: 100%;
  max-width: 230px;
}

.readonly-price-check-field > span {
  color: var(--blue);
  font-size: calc(14px * var(--font-scale));
  font-weight: 700;
}

.readonly-price-check-field .price-check-result small {
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
  line-height: 1.35;
}

.quotation-client-media {
  display: grid;
  gap: 92px;
  align-content: start;
}

.quotation-client-media .readonly-price-check-field {
  justify-self: center;
}

.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.primary:hover {
  background: var(--blue-dark);
}

.secondary:hover,
.icon-button:hover {
  border-color: #b8c5cf;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.toolbar-filter {
  display: grid;
  gap: 6px;
  min-width: 210px;
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.toolbar-filter select {
  width: 100%;
  min-height: 42px;
}

.active-column-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.column-filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.orders-panel {
  position: relative;
}

.column-filter-panel.is-floating {
  position: absolute;
  z-index: 20;
  display: block;
  width: 300px;
  max-width: min(300px, calc(100vw - 36px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(23, 32, 38, 0.16);
  overflow: hidden;
}

.column-filter-panel[hidden],
.active-column-filters[hidden] {
  display: none;
}

.column-filter-panel label {
  max-width: 420px;
}

.multi-filter-search {
  position: relative;
  display: block;
  max-width: none !important;
  padding: 8px 8px 0;
}

.multi-filter-search svg {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 14px;
  height: 14px;
  color: #9aa5b1;
}

.multi-filter-search input {
  min-height: 36px;
  padding-left: 32px;
  border-color: #ebedf0;
  border-radius: 10px;
  background: #fbfbfc;
}

.multi-filter-list {
  display: grid;
  max-height: 300px;
  padding: 6px 8px 8px;
  overflow: auto;
}

.multi-filter-option-row {
  display: grid;
  grid-template-columns: 18px 10px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  max-width: none !important;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--ink);
  font-weight: 500;
}

.multi-filter-option-row.no-status-dot {
  grid-template-columns: 18px minmax(0, 1fr);
}

.multi-filter-option-row:hover {
  background: #f3f4f6;
}

.multi-filter-option-row[hidden] {
  display: none;
}

.multi-filter-option-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-visual {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.multi-filter-option-row input:checked + .checkbox-visual {
  border-color: var(--blue);
  background: var(--blue);
}

.multi-filter-option-row input:checked + .checkbox-visual::after {
  width: 8px;
  height: 4px;
  border: solid #ffffff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
  content: "";
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.multi-filter-option-row span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-filter-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.multi-filter-footer button {
  min-height: 38px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.multi-filter-footer button + button {
  color: var(--muted);
}

.toolbar-search {
  width: min(420px, 100%);
  margin-left: 0;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  color: var(--ink);
  padding: 8px 10px;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(39, 119, 199, 0.14);
  outline: 0;
}

.table-scroll {
  overflow: auto;
  max-width: 100%;
}

table {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
  text-transform: none;
}

.column-filter-button {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  text-transform: inherit;
}

.column-filter-button svg {
  width: 13px;
  height: 13px;
  color: #9aa5b1;
  stroke-width: 1.9;
}

.column-filter-button.active,
.column-filter-button.active svg,
.column-filter-button:hover,
.column-filter-button:hover svg {
  color: var(--blue);
}

.orders-panel .order-list-table {
  min-width: 1670px;
  table-layout: fixed;
}

.orders-panel .order-list-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 16px;
  background: #f1f3f5;
  color: #2f3a45;
  font-size: calc(16px * var(--font-scale));
  font-weight: 700;
  box-shadow: inset 0 -1px 0 #d9dee3;
  vertical-align: middle;
}

.orders-panel .order-list-table tbody td {
  height: 40px;
  padding: 5px 16px;
  line-height: 1.18;
  vertical-align: middle;
}

.orders-panel .order-list-table .column-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
}

.orders-panel .order-list-table .sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  text-transform: inherit;
}

.orders-panel .order-list-table .sort-button:hover,
.orders-panel .order-list-table .sort-button.active {
  color: var(--blue);
}

.sort-indicator {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 11px;
  height: 14px;
}

.sort-indicator::before,
.sort-indicator::after {
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  content: "";
}

.sort-indicator::before {
  border-bottom: 5px solid #9aa5b1;
}

.sort-indicator::after {
  margin-top: 2px;
  border-top: 5px solid #9aa5b1;
}

.sort-button.active .sort-indicator[data-direction="asc"]::before {
  border-bottom-color: var(--blue);
}

.sort-button.active .sort-indicator[data-direction="desc"]::after {
  border-top-color: var(--blue);
}

.orders-panel .order-list-table .column-filter-button svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}

.orders-panel .order-list-table .status-pill {
  min-height: 22px;
  padding: 0 8px;
  font-weight: 400;
}

.orders-panel .order-list-table .lead-time-cell {
  gap: 3px;
  min-width: 112px;
}

.orders-panel .order-list-table .lead-progress-track {
  height: 5px;
}

.orders-panel .order-list-table .lead-time-cell span:last-child {
  font-size: calc(11px * var(--font-scale));
  line-height: 1.1;
}

.orders-panel .order-list-table th:nth-child(1),
.orders-panel .order-list-table td:nth-child(1) {
  width: 128px;
}

.orders-panel .order-list-table td:nth-child(1) .link-button {
  font-weight: 400;
}

.orders-panel .order-list-table th:nth-child(2),
.orders-panel .order-list-table td:nth-child(2) {
  width: 150px;
}

.orders-panel .order-list-table th:nth-child(3),
.orders-panel .order-list-table td:nth-child(3) {
  width: 240px;
}

.orders-panel .order-list-table th:nth-child(4),
.orders-panel .order-list-table td:nth-child(4) {
  width: 128px;
}

.orders-panel .order-list-table th:nth-child(5),
.orders-panel .order-list-table td:nth-child(5) {
  width: 150px;
}

.orders-panel .order-list-table th:nth-child(6),
.orders-panel .order-list-table td:nth-child(6) {
  width: 162px;
}

.orders-panel .order-list-table th:nth-child(7),
.orders-panel .order-list-table td:nth-child(7) {
  width: 145px;
}

.orders-panel .order-list-table th:nth-child(8),
.orders-panel .order-list-table td:nth-child(8) {
  width: 118px;
}

.orders-panel .order-list-table th:nth-child(9),
.orders-panel .order-list-table td:nth-child(9) {
  width: 138px;
}

.orders-panel .order-list-table th:nth-child(10),
.orders-panel .order-list-table td:nth-child(10) {
  width: 130px;
}

.orders-panel .order-list-table th:nth-child(11),
.orders-panel .order-list-table td:nth-child(11),
.orders-panel .order-list-table th:nth-child(12),
.orders-panel .order-list-table td:nth-child(12) {
  width: 112px;
}

.orders-panel .order-list-table th:nth-child(13),
.orders-panel .order-list-table td:nth-child(13) {
  width: 168px;
}

.orders-panel .order-list-table th:nth-child(14),
.orders-panel .order-list-table td:nth-child(14) {
  width: 150px;
}

.order-bl-cell {
  white-space: normal;
}

.order-bl-stack {
  display: grid;
  gap: 3px;
  align-content: center;
}

.order-bl-line {
  display: block;
  white-space: nowrap;
}

.order-actions-cell {
  white-space: nowrap;
}

.order-actions-cell .icon-button {
  min-height: 32px;
  padding: 0 10px;
}

.order-actions-cell .icon-button + .icon-button {
  margin-left: 6px;
}

tbody tr:hover {
  background: #f8fafc;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.status-production {
  background: rgba(214, 95, 0, 0.1);
  color: #d65f00;
}

.status-pending {
  background: rgba(20, 33, 61, 0.09);
  color: #14213d;
}

.status-inspection {
  background: rgba(0, 71, 255, 0.11);
  color: #0047ff;
}

.status-assigned {
  background: rgba(0, 114, 178, 0.12);
  color: #0072b2;
}

.status-ready {
  background: rgba(0, 131, 93, 0.12);
  color: #00835d;
}

.status-sailing {
  background: rgba(111, 44, 255, 0.11);
  color: #6f2cff;
}

.status-arrived {
  background: rgba(0, 122, 90, 0.12);
  color: #007a5a;
}

.status-delivered {
  background: rgba(0, 131, 93, 0.12);
  color: #00835d;
}

.status-cancelled {
  background: rgba(208, 0, 63, 0.1);
  color: #d0003f;
}

.table-header-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.table-header-filter select {
  height: 28px;
  min-width: 108px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: calc(11px * var(--font-scale));
  font-weight: 700;
  padding: 0 24px 0 10px;
}

.container-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
  white-space: nowrap;
}

.container-status-draft {
  background: #f4f6f8;
  border-color: #d8dee6;
  color: #475569;
}

.container-status-booking-request {
  background: #fff7df;
  border-color: #f2d58f;
  color: #a15c00;
}

.container-status-scheduled {
  background: #e8f3ff;
  border-color: #b7daf8;
  color: #006bb6;
}

.container-status-on-the-way {
  background: #f0e9ff;
  border-color: #d8c6ff;
  color: #6c35c9;
}

.container-status-customs-cleared {
  background: #e9f8f2;
  border-color: #bcebd8;
  color: #007a5a;
}

.container-status-delivered {
  background: #e4f7ee;
  border-color: #b9e9d1;
  color: #08794d;
}

.container-status-complete {
  background: #e6f2ea;
  border-color: #b9dec7;
  color: #006b4f;
}

.container-status-cancelled {
  background: #ffe9ef;
  border-color: #ffc2d1;
  color: #c81e4b;
}

.container-po-links {
  display: inline-grid;
  gap: 6px;
  justify-items: start;
}

.container-po-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.container-po-link:hover,
.container-po-link:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef6ff;
  outline: none;
}

.order-row {
  cursor: pointer;
}

.lead-time-cell,
.lead-time-block {
  display: grid;
  gap: 5px;
  min-width: 118px;
}

.lead-progress-track {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f3f4;
}

.lead-progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.lead-progress-bar.tone-ok,
.lead-progress-bar.tone-done {
  background: #12b886;
}

.lead-progress-bar.tone-danger {
  background: #ff5c61;
}

.lead-progress-bar.tone-neutral {
  background: #c8d0d8;
}

.lead-time-cell span:last-child,
.lead-time-block span:last-child {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.neutral {
  background: #eef3f7;
  color: #52606b;
}

.form-stack {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.form-two,
.import-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.inline-input-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.upload-strip {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(140px, 0.8fr) minmax(180px, 0.8fr);
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.import-actions {
  padding: 0 18px 18px;
}

.file-drop {
  position: relative;
  align-content: end;
}

.file-drop span {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px dashed #9fb1c0;
  border-radius: var(--radius);
  background: #f8fbfd;
  color: var(--ink);
}

.file-drop svg {
  position: absolute;
  right: 18px;
  bottom: 9px;
}

.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.document-list,
.activity-log,
.wide-label {
  padding: 0 18px 18px;
}

.doc-item,
.log-item,
.client-order {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.doc-item:last-child,
.log-item:last-child,
.client-order:last-child {
  border-bottom: 0;
}

.doc-top,
.client-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doc-meta,
.log-item,
.client-order p {
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
}

.doc-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.doc-link.disabled {
  color: var(--muted);
  pointer-events: none;
}

.import-grid {
  padding: 18px;
}

.wide-label {
  display: grid;
}

.client-panel {
  overflow: hidden;
}

.client-picker {
  min-width: 180px;
}

.client-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.route-card {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #edf5f5;
}

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

.client-summary strong {
  display: block;
  margin-bottom: 8px;
  font-size: calc(22px * var(--font-scale));
}

.client-summary p {
  margin: 0 0 12px;
  color: var(--muted);
}

.client-orders {
  display: grid;
  gap: 4px;
}

.client-mode .admin-only {
  display: none !important;
}

.client-mode .content-grid,
.client-mode .lower-grid {
  grid-template-columns: 1fr;
}

.module-page {
  min-width: 0;
  min-height: calc(100vh - 70px);
}

.module-shell {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.module-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  max-width: 100%;
  min-width: 0;
}

.module-header > div:first-child {
  min-width: 0;
}

.module-header h1 {
  margin: 0;
  font-size: calc(28px * var(--font-scale));
  line-height: 1.15;
}

.module-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: calc(15px * var(--font-scale));
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-end;
}

.module-actions .icon-button {
  max-width: 100%;
  white-space: nowrap;
}

.qc-inspection-shell {
  --font-scale: 1;
  font-weight: 400;
  min-width: 0;
  overflow-x: hidden;
}

.qc-inspection-shell h2,
.qc-inspection-shell h3,
.qc-inspection-shell strong,
.qc-inspection-shell b,
.qc-inspection-shell button,
.qc-inspection-shell input,
.qc-inspection-shell select,
.qc-inspection-shell textarea,
.qc-inspection-shell label,
.qc-inspection-shell .icon-button,
.qc-inspection-shell .toolbar-filter,
.qc-inspection-shell .toolbar-filter span {
  font-weight: 400 !important;
}

.qc-inspection-shell .module-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.qc-inspection-shell .module-header h1 {
  font-weight: 700 !important;
}

.qc-inspection-shell .module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-self: end;
  max-width: min(100%, 340px);
}

.qc-inspection-shell > section:not(.module-header) {
  min-width: 0;
  max-width: 100%;
}

.module-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.product-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 468px) minmax(140px, 170px) auto;
  align-items: end;
  width: fit-content;
  max-width: 100%;
}

.product-toolbar .suggestion-wrap {
  width: 100%;
}

.product-toolbar .search-box {
  width: 100%;
}

.toolbar-control {
  min-width: 140px;
}

.module-toolbar .search-box {
  grid-template-columns: 20px minmax(180px, 320px);
}

.customer-toolbar {
  align-items: end;
}

.customer-toolbar > label:not(.search-box) {
  display: grid;
  gap: 6px;
  min-width: 154px;
}

.customer-toolbar select,
.customer-toolbar .search-box {
  min-height: 42px;
}

.toolbar-filter {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.toolbar-filter span {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.toolbar-filter select,
.toolbar-filter input[type="date"],
.toolbar-filter input[type="text"] {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
  font: inherit;
  font-weight: 700;
}

.qc-toolbar {
  align-items: end;
  max-width: 100%;
  flex-wrap: wrap;
}

.qc-toolbar .search-box {
  grid-template-columns: 20px minmax(160px, 280px);
}

.qc-toolbar .toolbar-filter {
  min-width: 156px;
}

.qc-date-filter {
  min-width: 132px;
}

.qc-export-button {
  align-self: end;
  min-height: 42px;
  white-space: nowrap;
}

.payment-toolbar {
  align-items: end;
  margin-top: -4px;
}

.product-toolbar .search-box {
  grid-template-columns: 20px minmax(0, 1fr);
}

.product-sheets-shell {
  gap: 8px;
}

.product-sheets-shell .module-header {
  align-items: center;
}

.product-sheets-shell .module-header h1 {
  font-size: calc(24px * var(--font-scale));
}

.product-sheets-shell .module-header p {
  margin-top: 2px;
}

.product-sheets-shell .module-toolbar {
  gap: 7px;
}

.product-sheets-shell .toolbar-control select,
.product-sheets-shell .search-box {
  min-height: 42px;
}

.product-sheets-shell .product-data-table tbody td,
.product-sheets-shell .product-data-table tbody td strong,
.product-sheets-shell .product-data-table tbody td b,
.product-sheets-shell .quotation-card-body h3,
.product-sheets-shell .quotation-card-facts dt,
.product-sheets-shell .quotation-card-facts dd,
.product-sheets-shell .quotation-open-hint {
  font-weight: 400;
}

.product-view-toggle {
  align-self: end;
  min-width: 132px;
}

.product-view-toggle button {
  display: grid;
  place-items: center;
}

.product-view-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.suggestion-wrap {
  position: relative;
}

.suggestion-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: min(360px, 90vw);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(23, 32, 38, 0.16);
  overflow: hidden;
}

.suggestion-menu button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.suggestion-menu button:hover {
  background: #f7f8fa;
}

.suggestion-menu button:last-child {
  border-bottom: 0;
}

.suggestion-menu span {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
}

.chip-row,
.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip,
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfd;
  color: var(--ink);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.chip-remove {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: inherit;
  font-weight: 700;
  line-height: 1;
}

.chip-remove:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.clear-all-chip {
  color: var(--blue);
}

.filter-chip.active {
  border-color: currentColor;
  box-shadow: inset 0 0 0 1px currentColor;
}

.container-status-filter-chip {
  border-color: transparent;
  cursor: pointer;
}

.container-status-filter-chip.container-status-all {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.container-status-filter-chip.active {
  border-color: currentColor;
  box-shadow: inset 0 0 0 1px currentColor;
}

.container-status-filter-chip:not(.active):hover {
  border-color: currentColor;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

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

.container-list-table th,
.container-list-table td {
  padding: 6px 8px;
  line-height: 1.15;
}

.container-list-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  overflow: visible;
  background: #f1f3f5;
  color: #2f3a45;
  font-size: calc(16px * var(--font-scale));
  font-weight: 700;
  box-shadow: inset 0 -1px 0 #d9dee3;
  vertical-align: bottom;
}

.container-list-table.has-filter-menu {
  margin-bottom: 330px;
}

.container-list-table tbody td {
  padding: 3px 8px;
  font-weight: 400;
  vertical-align: top;
}

.container-list-table tbody td strong,
.container-list-table tbody td b {
  font-weight: 400;
}

.container-column-header {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: max-content;
}

.container-column-sort,
.container-filter-trigger {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.container-column-sort {
  gap: 4px;
  padding: 0;
}

.container-sort-mark {
  color: #87919c;
  font-size: calc(15px * var(--font-scale));
  line-height: 1;
}

.container-column-sort.active .container-sort-mark,
.container-filter-trigger.active {
  color: var(--blue);
}

.container-filter-trigger {
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
}

.container-filter-trigger:hover {
  background: #eef3f8;
}

.container-filter-trigger svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.container-column-filter-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: 286px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(23, 32, 38, 0.18);
  color: var(--ink);
  text-transform: none;
}

.container-list-table th:nth-last-child(-n + 3) .container-column-filter-menu {
  left: auto;
  right: 0;
}

.container-filter-search {
  position: relative;
  display: block;
  padding: 8px 8px 0;
}

.container-filter-search svg {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 14px;
  height: 14px;
  color: #9aa5b1;
}

.container-filter-search input {
  width: 100%;
  min-height: 36px;
  padding-left: 32px;
  border-color: #ebedf0;
  border-radius: 10px;
  background: #fbfbfc;
  font-size: calc(14px * var(--font-scale));
  font-weight: 500;
}

.container-filter-options {
  display: grid;
  max-height: 300px;
  padding: 6px 8px 8px;
  overflow: auto;
}

.container-filter-option {
  display: grid;
  grid-template-columns: 18px 10px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  max-width: none !important;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--ink);
  font-size: calc(14px * var(--font-scale));
  font-weight: 500;
}

.container-filter-option.no-status-dot {
  grid-template-columns: 18px minmax(0, 1fr);
}

.container-filter-option:hover {
  background: #f3f4f6;
}

.container-filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.container-filter-option input:checked + .checkbox-visual {
  border-color: var(--blue);
  background: var(--blue);
}

.container-filter-option input:checked + .checkbox-visual::after {
  width: 8px;
  height: 4px;
  border: solid #ffffff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
  content: "";
}

.container-filter-option span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container-filter-empty {
  margin: 0;
  padding: 14px 8px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.container-filter-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.container-filter-footer button {
  min-height: 38px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.container-filter-footer button:hover {
  background: #f3f4f6;
}

.container-list-table .container-status-pill {
  min-height: 18px;
  padding: 0 7px;
  font-size: calc(11px * var(--font-scale));
  font-weight: 400;
}

.container-list-table .container-po-links {
  gap: 3px;
}

.container-list-table .container-po-link {
  min-height: 20px;
  padding: 0 7px;
  font-size: calc(11px * var(--font-scale));
  font-weight: 400;
}

.container-list-table .container-supplier-stack,
.container-list-table .stacked-cell {
  gap: 1px;
  line-height: 1.12;
}

.container-list-table .stacked-cell {
  font-size: calc(11px * var(--font-scale));
}

.product-data-table {
  min-width: 1580px;
  table-layout: fixed;
}

.product-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f3f5;
  color: #2f3a45;
  font-size: calc(16px * var(--font-scale));
  font-weight: 700;
  box-shadow: inset 0 -1px 0 #d9dee3;
}

.product-data-table th,
.product-data-table td {
  padding: 9px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.28;
}

.product-data-table th:nth-child(1),
.product-data-table td:nth-child(1) {
  width: 112px;
}

.product-data-table th:nth-child(2),
.product-data-table td:nth-child(2) {
  width: 280px;
}

.product-data-table th:nth-child(3),
.product-data-table td:nth-child(3) {
  width: 112px;
}

.product-data-table th:nth-child(4),
.product-data-table td:nth-child(4) {
  width: 122px;
}

.product-data-table th:nth-child(5),
.product-data-table td:nth-child(5) {
  width: 146px;
}

.product-data-table th:nth-child(6),
.product-data-table td:nth-child(6) {
  width: 160px;
}

.product-data-table th:nth-child(7),
.product-data-table td:nth-child(7) {
  width: 126px;
}

.product-data-table th:nth-child(8),
.product-data-table td:nth-child(8) {
  width: 280px;
}

.product-data-table th:nth-child(9),
.product-data-table td:nth-child(9) {
  width: 140px;
}

.product-data-table th:nth-child(10),
.product-data-table td:nth-child(10) {
  width: 102px;
}

.data-table.compact {
  min-width: 820px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.link-button:hover {
  color: var(--blue);
}

.customer-click-row,
.supplier-click-row {
  cursor: pointer;
}

.customer-click-row:hover td,
.supplier-click-row:hover td {
  background: #f8fbff;
}

.customer-data-table thead th,
.supplier-data-table thead th,
.forwarder-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f3f5;
  color: #2f3a45;
  font-size: calc(16px * var(--font-scale));
  font-weight: 700;
  box-shadow: inset 0 -1px 0 #d9dee3;
}

.customer-data-table tbody td,
.customer-data-table tbody td strong,
.customer-data-table tbody td b,
.customer-data-table tbody .link-button,
.supplier-data-table tbody td,
.supplier-data-table tbody td strong,
.supplier-data-table tbody td b,
.supplier-data-table tbody .link-button,
.supplier-data-table tbody .strong-link,
.forwarder-data-table tbody td,
.forwarder-data-table tbody td strong,
.forwarder-data-table tbody td b,
.forwarder-data-table tbody .link-button {
  font-weight: 400;
}

.forwarder-data-table {
  min-width: 980px;
  table-layout: fixed;
}

.forwarder-data-table th,
.forwarder-data-table td {
  padding: 9px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.28;
}

.forwarder-data-table th:nth-child(1),
.forwarder-data-table td:nth-child(1) {
  width: 220px;
}

.forwarder-data-table th:nth-child(2),
.forwarder-data-table td:nth-child(2) {
  width: 220px;
}

.forwarder-data-table th:nth-child(4),
.forwarder-data-table td:nth-child(4),
.forwarder-data-table th:nth-child(5),
.forwarder-data-table td:nth-child(5) {
  width: 112px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.product-detail-grid {
  grid-template-columns: minmax(0, 1fr) minmax(460px, 520px);
}

.product-list-layout {
  min-width: 0;
  padding-bottom: 46px;
}

.product-list-panel {
  min-width: 0;
  overflow: hidden;
}

.product-table-scroll {
  width: 100%;
  min-width: 0;
  height: clamp(500px, calc(100vh - 255px), 820px);
  overflow: scroll;
  max-width: 100%;
  padding-bottom: 4px;
  margin-bottom: 10px;
  overscroll-behavior: contain;
  scrollbar-color: #8d939a #eef1f4;
  scrollbar-width: auto;
}

.product-table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.product-table-scroll::-webkit-scrollbar-track {
  background: #eef1f4;
  border-radius: 999px;
}

.product-table-scroll::-webkit-scrollbar-thumb {
  background: #8d939a;
  border-radius: 999px;
}

.product-row {
  cursor: pointer;
}

.product-row:hover {
  background: #f8fbfd;
}

.product-name-cell {
  min-width: 0;
}

.product-name-stack {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.product-list-thumb {
  display: grid;
  place-items: center;
  width: 36px;
  height: 30px;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  background: #f7fafc;
  color: var(--muted);
  font-size: calc(8px * var(--font-scale));
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  overflow: hidden;
}

.product-list-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}

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

.product-row-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.product-row:hover .product-row-actions,
.product-row:focus-within .product-row-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mini-action-button {
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: calc(11px * var(--font-scale));
  font-weight: 700;
  white-space: nowrap;
}

.mini-action-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.danger-button {
  border-color: rgba(208, 0, 63, 0.26);
  color: #b00035;
}

.danger-button:hover {
  border-color: #d0003f;
  color: #d0003f;
}

.product-editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.product-detail-overlay {
  position: fixed;
  z-index: 76;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(900px, 62vw);
  background: rgba(247, 249, 251, 0.68);
  backdrop-filter: blur(5px);
}

.product-detail-scrim {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.product-detail-drawer {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -18px 0 40px rgba(38, 52, 66, 0.14);
  overflow: hidden;
}

.product-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.product-detail-heading {
  min-width: 0;
}

.product-detail-heading h2 {
  margin: 3px 0 4px;
  font-size: calc(22px * var(--font-scale));
  line-height: 1.18;
  white-space: normal;
  overflow-wrap: anywhere;
}

.product-detail-heading span {
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
}

.product-detail-body {
  min-height: 0;
  padding: 14px 20px 20px;
  overflow: auto;
}

.product-admin-layout {
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.product-media-panel,
.product-form-panel,
.product-admin-controls {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.product-detail-image {
  min-height: 138px;
  max-height: 150px;
}

.product-detail-image img {
  max-height: 150px;
}

.compact-file-drop {
  min-height: 52px;
}

.product-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: end;
}

.product-editor-grid label,
.product-media-panel label,
.product-admin-controls label,
.product-notes-field {
  min-width: 0;
}

.product-editor-grid input,
.product-editor-grid select,
.product-admin-controls select,
.product-notes-field textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.product-admin-lower {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(320px, 1.25fr) minmax(220px, 0.75fr);
  gap: 14px;
  align-items: stretch;
}

.product-admin-lower .product-admin-controls {
  grid-column: 3;
  grid-row: 1;
}

.product-admin-lower .product-specification-field {
  grid-column: 2 / -1;
}

.product-notes-field {
  display: grid;
  gap: 6px;
}

.product-notes-field textarea {
  min-height: 150px;
  resize: vertical;
}

.detail-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.editor-card {
  overflow: hidden;
}

.detail-card h3 {
  margin: 0;
  font-size: calc(19px * var(--font-scale));
}

.detail-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
}

.detail-meta strong {
  color: var(--ink);
}

.image-slot {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed #b8c5cf;
  border-radius: var(--radius);
  background: #f7fafc;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}

.image-slot img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: contain;
}

.quotation-shell {
  gap: 12px;
}

.quotation-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px) minmax(150px, 190px) minmax(140px, 170px);
  gap: 10px;
  align-items: center;
}

.quotation-toolbar .search-box {
  width: 100%;
  grid-template-columns: 20px minmax(0, 1fr);
}

.quotation-toolbar select,
.quotation-toolbar .search-box {
  min-height: 42px;
}

.client-mode .quotation-toolbar {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px) minmax(140px, 170px);
}

.quotation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.quotation-card {
  display: grid;
  grid-template-rows: auto auto;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(38, 52, 66, 0.06);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.quotation-card:hover,
.quotation-card:focus-visible {
  border-color: #b8c5cf;
  box-shadow: 0 16px 32px rgba(38, 52, 66, 0.11);
  outline: none;
  transform: translateY(-1px);
}

.quotation-card-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 8px;
  background: #f7fafc;
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
  overflow: hidden;
}

.quotation-card-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.quotation-shell .quotation-card-image img,
.product-sheets-shell .quotation-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}

.quotation-card-body {
  display: grid;
  gap: 6px;
  padding: 10px 11px 8px;
}

.quotation-card-body h3 {
  margin: 0;
  min-height: 22px;
  font-size: calc(17px * var(--font-scale));
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.quotation-card-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0;
}

.quotation-card-facts div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #e4e8ed;
  border-radius: 8px;
  background: #fbfcfd;
}

.quotation-card-facts dt {
  color: var(--muted);
  font-size: calc(11px * var(--font-scale));
  font-weight: 700;
  text-transform: none;
}

.quotation-card-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.quotation-open-hint {
  color: var(--blue);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.quotation-detail-overlay {
  position: fixed;
  z-index: 76;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(920px, 64vw);
  background: rgba(247, 249, 251, 0.68);
  backdrop-filter: blur(5px);
}

.quotation-detail-scrim {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.quotation-detail-drawer {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -18px 0 40px rgba(38, 52, 66, 0.14);
  overflow: hidden;
}

.quotation-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.quotation-detail-heading h2 {
  margin: 3px 0 4px;
  font-size: calc(22px * var(--font-scale));
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.quotation-detail-heading span {
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
}

.quotation-detail-body {
  min-height: 0;
  padding: 16px 20px 20px;
  overflow: auto;
}

.quotation-admin-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.65fr) minmax(420px, 1.4fr);
  gap: 14px;
  align-items: start;
}

.quotation-media-panel,
.quotation-form-panel,
.quotation-actions-panel,
.quotation-wechat-card {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.quotation-product-image {
  min-height: 190px;
  max-height: 240px;
}

.quotation-product-image img {
  max-height: 240px;
}

.quotation-avatar-slot {
  display: grid;
  place-items: center;
  min-height: 108px;
  border: 1px dashed #b8c5cf;
  border-radius: var(--radius);
  background: #f7fafc;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}

.quotation-avatar-slot img {
  width: 100%;
  height: 100%;
  max-height: 140px;
  object-fit: contain;
}

.quotation-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: start;
}

.quotation-editor-grid label,
.quotation-field,
.quotation-wide-field {
  min-width: 0;
}

.quotation-editor-grid input,
.quotation-editor-grid select,
.quotation-customer-dropdown-button,
.quotation-wide-field input,
.quotation-wide-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
}

.quotation-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
}

.quotation-customer-dropdown {
  position: relative;
}

.quotation-customer-dropdown-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.quotation-customer-dropdown-button span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quotation-customer-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(23, 32, 38, 0.16);
  overflow: auto;
}

.quotation-customer-menu[hidden] {
  display: none;
}

.quotation-customer-option {
  font-size: calc(13px * var(--font-scale));
}

.quotation-unit-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.quotation-unit-control > span {
  display: inline-grid;
  min-height: 46px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  box-sizing: border-box;
}

.dimension-field {
  display: grid;
  gap: 6px;
  align-self: stretch;
}

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

.dimension-inputs input {
  text-align: center;
}

.quotation-wide-field {
  display: grid;
  gap: 6px;
}

.quotation-wide-field textarea {
  min-height: 104px;
  resize: vertical;
}

.quotation-wide-field input {
  min-height: 42px;
}

.quotation-address-field input {
  min-height: 42px;
}

.quotation-specification-field textarea,
.product-specification-field textarea {
  min-height: 180px;
}

.quotation-actions-panel {
  position: sticky;
  top: 0;
}

.quotation-actions-panel .icon-button {
  min-height: 54px;
}

.container-detail-overlay {
  grid-template-columns: minmax(180px, 1fr) minmax(980px, 72vw);
}

.container-detail-drawer {
  min-width: 0;
}

.container-detail-header-actions {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  flex: 0 0 auto;
}

.container-detail-header-actions .modal-close {
  position: static;
}

.container-detail-header-actions .container-status-readonly {
  min-height: auto;
  padding-top: 1px;
}

.container-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: start;
}

.container-editor-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.container-editor-grid input,
.container-editor-grid select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
}

.container-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.container-summary-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.container-summary-grid article.wide {
  grid-column: span 4;
}

.container-forwarder-bill {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.container-forwarder-bill legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.currency-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.currency-input span {
  padding: 0 0 0 12px;
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.currency-input input {
  border: 0;
  background: transparent;
}

.currency-input input:focus {
  outline: 0;
  box-shadow: none;
}

.container-bill-save {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.container-summary-grid span,
.container-po-option small {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.container-summary-grid strong {
  overflow-wrap: anywhere;
  font-size: calc(16px * var(--font-scale));
}

.container-customs-documents,
.container-cargo-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.container-customs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.container-customs-documents h3,
.container-cargo-summary h3 {
  margin: 0;
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
  font-weight: 800;
  text-transform: uppercase;
}

.container-customs-regenerate {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.container-customs-regenerate:hover {
  border-color: #b8c5cf;
}

.container-document-button-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.container-cargo-summary {
  margin-top: 16px;
}

.container-cargo-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.container-cargo-summary-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.container-cargo-summary-grid span {
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
}

.container-cargo-summary-grid strong {
  color: var(--ink);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.2;
}

.container-po-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.container-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.container-section-heading h3 {
  margin: 2px 0 0;
  font-size: calc(19px * var(--font-scale));
}

.container-po-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.container-order-groups {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.container-order-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.container-order-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: calc(14px * var(--font-scale));
  font-weight: 700;
  list-style: none;
}

.container-order-group summary::-webkit-details-marker {
  display: none;
}

.container-order-group[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.group-chevron {
  display: inline-block;
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.container-order-group[open] .group-chevron {
  transform: rotate(180deg);
}

.container-order-group-items {
  display: grid;
}

.container-po-filters {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.container-po-search {
  width: min(100%, 620px);
}

.container-customer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-container-po {
  margin: 0;
  padding: 14px 12px;
}

.container-po-option {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.container-po-option:last-child {
  border-bottom: 0;
}

.container-po-option:hover {
  background: #f6f9fc;
}

.recent-container-row {
  animation: container-row-pulse 1.8s ease;
}

@keyframes container-row-pulse {
  0%,
  100% {
    background: transparent;
  }

  18%,
  70% {
    background: #ecfdf5;
  }
}

.container-po-option > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.container-po-thumbs {
  display: flex;
  align-items: center;
  min-width: 48px;
}

.container-po-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f6f9fb;
  color: var(--muted);
  font-size: calc(7px * var(--font-scale));
  font-weight: 700;
  text-align: center;
}

.container-po-thumbs .container-po-thumb + .container-po-thumb {
  margin-left: -10px;
  box-shadow: 0 0 0 2px #fff;
}

.container-po-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.container-po-thumb.more {
  background: #eef4ff;
  color: var(--primary);
}

.container-po-option strong,
.container-po-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container-contents-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.container-contents-empty {
  padding: 14px 0 2px;
  color: var(--muted);
}

.container-contents-empty p {
  margin: 0;
}

.container-contents-list {
  display: grid;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.container-content-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.container-content-row:last-child {
  border-bottom: 0;
}

.container-content-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.container-content-row strong,
.container-content-row small,
.container-content-supplier {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container-content-row small,
.container-content-supplier {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.container-content-order {
  border-bottom: 1px solid var(--line);
}

.container-content-order:last-child {
  border-bottom: 0;
}

.container-supplier-cell {
  min-width: 300px;
  white-space: normal;
}

.container-supplier-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.35;
}

.container-supplier-stack span {
  display: block;
  white-space: normal;
}

.stacked-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.35;
  white-space: nowrap;
}

.forwarder-bill-cell {
  min-width: 190px;
}

.container-content-order-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #fbfcfd;
}

.container-content-order-header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.container-content-order-header strong,
.container-content-order-header small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container-content-order-header small {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.container-content-lines {
  display: grid;
  min-width: 1120px;
}

.container-content-lines.has-actions {
  min-width: 1240px;
}

.container-content-line {
  display: grid;
  grid-template-columns:
    minmax(100px, 0.8fr)
    minmax(86px, 0.72fr)
    minmax(180px, 1.45fr)
    minmax(82px, 0.68fr)
    minmax(70px, 0.55fr)
    minmax(96px, 0.78fr)
    minmax(72px, 0.55fr)
    minmax(100px, 0.8fr)
    minmax(112px, 0.88fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: calc(13px * var(--font-scale));
}

.container-content-lines.has-actions .container-content-line {
  grid-template-columns:
    minmax(100px, 0.8fr)
    minmax(86px, 0.72fr)
    minmax(180px, 1.45fr)
    minmax(82px, 0.68fr)
    minmax(70px, 0.55fr)
    minmax(96px, 0.78fr)
    minmax(72px, 0.55fr)
    minmax(100px, 0.8fr)
    minmax(112px, 0.88fr)
    minmax(86px, 0.58fr);
}

.container-content-line > span {
  min-width: 0;
}

.container-content-line:first-child {
  border-top: 0;
}

.container-content-po-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.container-content-po-cell strong {
  overflow: hidden;
  font-size: calc(13px * var(--font-scale));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container-content-product-code {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container-content-action-cell {
  justify-self: end;
  white-space: nowrap;
}

.container-content-line.header {
  background: #f7f7f7;
  color: var(--ink);
  font-size: calc(13px * var(--font-scale));
  font-weight: 800;
  text-transform: none;
}

.container-content-line.header span {
  line-height: 1.25;
  white-space: normal;
}

.container-inspection-cell {
  display: inline-grid;
  gap: 4px;
  min-width: 0;
  align-items: start;
}

.container-inspection-cell small {
  color: var(--muted);
  font-size: calc(11px * var(--font-scale));
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.container-inspection-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: calc(11px * var(--font-scale));
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.container-inspection-passed {
  background: #d9f8eb;
  border-color: #b9e9d1;
  color: #007a5a;
}

.container-inspection-scheduled,
.container-inspection-inspection {
  background: #e8f3ff;
  border-color: #b7daf8;
  color: #006bb6;
}

.container-inspection-pending,
.container-inspection-production {
  background: #f4f6f8;
  border-color: #d8dee6;
  color: #475569;
}

.container-inspection-ready,
.container-inspection-assigned,
.container-inspection-sailing,
.container-inspection-arrived {
  background: #e4f7ee;
  border-color: #b9e9d1;
  color: #08794d;
}

.container-inspection-cancelled {
  background: #ffe9ef;
  border-color: #ffc2d1;
  color: #c81e4b;
}

.container-line-qty-input {
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.container-editor-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.container-detail-commandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.container-advance-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #151b24;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.container-advance-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.container-detail-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.container-top-action-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.container-top-action-button svg {
  width: 16px;
  height: 16px;
}

.container-top-action-button:hover {
  border-color: #b8c5cf;
}

.container-top-action-button:disabled {
  opacity: 0.58;
  cursor: default;
}

.container-top-action-button.danger-button {
  color: #e0002a;
}

.container-status-readonly {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
}

.container-lock-toggle {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.container-lock-toggle.locked {
  color: #0756c9;
  border-color: rgba(0, 107, 214, 0.35);
  background: #eef6ff;
}

.container-lock-toggle.unlocked {
  color: #9a5b00;
  border-color: rgba(245, 158, 11, 0.36);
  background: #fff7e6;
}

.container-lock-toggle:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.container-content-order.locked {
  background: #fbfdff;
}

.container-content-order.locked .container-line-qty-input {
  background: #f3f6fa;
  color: var(--muted);
}

.container-editor-actions .danger-button:disabled,
.container-content-order-header .danger-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
}

.forwarder-detail-overlay {
  grid-template-columns: minmax(180px, 1fr) minmax(680px, 48vw);
}

.forwarder-detail-drawer {
  min-width: 0;
}

.forwarder-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.forwarder-form-panel,
.forwarder-media-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.forwarder-form-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
}

.forwarder-form-panel input,
.forwarder-form-panel textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
}

.forwarder-form-panel textarea {
  resize: vertical;
}

.forwarder-wechat-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed #b8c5cf;
  border-radius: var(--radius);
  background: #f7fafc;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  overflow: hidden;
}

.forwarder-wechat-preview img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: contain;
}

.forwarder-upload-button {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px dashed #9db7d3;
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.forwarder-upload-button input {
  display: none;
}

.forwarder-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.order-detail-overlay {
  grid-template-columns: minmax(220px, 1fr) minmax(920px, 64vw);
}

.order-admin-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1fr);
  gap: 14px;
  align-items: start;
}

.order-form-panel {
  min-width: 0;
}

.order-editor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.order-supplier-field {
  min-width: 0;
}

.order-supplier-menu {
  max-height: 260px;
}

.order-supplier-option {
  min-height: 34px;
}

.order-supplier-option > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-actions-panel {
  position: static;
  top: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.order-actions-panel .icon-button {
  width: 112px;
  min-height: 38px;
  padding: 0 12px;
}

.order-readonly-drawer {
  max-width: min(980px, 100vw);
}

.order-readonly-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: start;
  gap: 10px;
}

.order-readonly-drawer [data-action="delete-order"],
.order-readonly-drawer .order-header-delete {
  display: none !important;
}

.order-header-delete {
  min-height: 34px;
}

.order-readonly-body {
  display: grid;
  gap: 10px;
  background: #ffffff;
}

.order-detail-card {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.order-detail-card h3,
.order-section-heading h3 {
  margin: 0;
  color: var(--muted);
  font-size: calc(14px * var(--font-scale));
  font-weight: 700;
  text-transform: none;
}

.order-detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.order-detail-facts div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.order-detail-facts span {
  color: var(--muted);
  font-weight: 600;
}

.order-detail-facts strong {
  color: var(--ink);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.line-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.line-product-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f6f9fb;
  color: var(--muted);
  font-size: calc(8px * var(--font-scale));
  font-weight: 700;
  text-align: center;
}

.line-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.line-product-name {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.container-chip,
.soft-pill,
.success-chip,
.danger-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.container-chip,
.soft-pill {
  background: #eef2ff;
  color: #335cff;
}

.success-chip {
  background: #d9f8eb;
  color: #007a5a;
}

.danger-chip {
  background: #ffe5ec;
  color: #d0003f;
}

.document-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

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

.document-open-button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.document-open-button span {
  color: var(--muted);
  font-weight: 600;
}

.mini-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.mini-table {
  min-width: 760px;
}

.mini-table th,
.mini-table td {
  padding: 10px 12px;
}

.order-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quotation-compact-actions-panel {
  grid-column: 2;
  position: static;
  top: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.quotation-compact-actions-panel .icon-button {
  width: 92px;
  min-height: 34px;
  padding: 0 10px;
}

.quotation-client-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}

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

.quotation-client-summary div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
}

.quotation-client-summary span {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
  text-transform: none;
}

.quotation-client-summary strong {
  color: var(--ink);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.quotation-client-specification {
  grid-column: 1 / -1;
}

.read-only-grid {
  display: grid;
  gap: 10px;
}

.read-only-row {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.read-only-row span,
.note-box span {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
  text-transform: none;
}

.read-only-row strong {
  color: var(--ink);
  font-size: calc(15px * var(--font-scale));
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.note-box {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.note-box p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.mini-metric-grid,
.payment-summary,
.supplier-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.mini-metric,
.payment-card {
  display: block;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.payment-card {
  width: 100%;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.payment-card:hover {
  border-color: #b7d8ff;
  background: #f7fbff;
}

.payment-card.active {
  border-color: var(--blue);
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px var(--blue);
}

.mini-metric span,
.payment-card span {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.mini-metric strong,
.payment-card strong {
  display: block;
  margin-top: 8px;
  font-size: calc(22px * var(--font-scale));
}

.payment-status-filter-chip {
  cursor: pointer;
}

.payment-status-filter-chip.active {
  border-color: var(--blue);
  background: #eef6ff;
  color: var(--blue);
}

.payment-group-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow-x: auto;
  overflow-y: hidden;
}

.payment-group-head,
.payment-group-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.6fr) 95px 85px 115px 120px 95px;
  gap: 12px;
  align-items: center;
  min-width: 760px;
  padding: 12px 16px;
}

.payment-group-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f3f5;
  color: #2f3a45;
  font-size: calc(16px * var(--font-scale));
  font-weight: 700;
  box-shadow: inset 0 -1px 0 #d9dee3;
  text-transform: none;
}

.payment-group-row {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.payment-group-row:hover {
  background: #f8fbff;
}

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

.payment-payee::before {
  content: ">";
  color: var(--muted);
  font-weight: 700;
}

.payment-group.open .payment-payee::before {
  content: "v";
}

.payment-payee strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-tag {
  justify-self: start;
  border-radius: 999px;
  padding: 6px 11px;
  background: #eef2ff;
  color: #2454d6;
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
  line-height: 1.15;
}

.payment-tag-supplier {
  background: #ecfdf5;
  color: #047857;
}

.payment-tag-sourcing-agent {
  background: #fff7ed;
  color: #c2410c;
}

.payment-tag-forwarder {
  background: #eff6ff;
  color: #0369a1;
}

.payment-status {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2f7;
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.payment-status.danger {
  background: #ffe3e6;
  color: #d90429;
}

.payment-status.paid {
  background: #dff7ec;
  color: #00835d;
}

.payment-detail-table {
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.payment-detail-head,
.payment-detail-row {
  display: grid;
  grid-template-columns: 120px 90px 80px 100px minmax(150px, 1fr) 100px 80px 100px;
  gap: 12px;
  align-items: center;
  min-width: 760px;
  padding: 10px 16px;
}

.payment-group-head > *,
.payment-group-row > *,
.payment-detail-head > *,
.payment-detail-row > * {
  min-width: 0;
}

.payment-detail-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #6b7280;
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
  box-shadow: inset 0 -1px 0 #e5e7eb;
  text-transform: none;
}

.payment-detail-row {
  border-top: 1px solid var(--line);
  background: #fff;
}

.payment-detail-table-readonly .payment-detail-head,
.payment-detail-table-readonly .payment-detail-row {
  grid-template-columns: 120px 90px 80px 100px minmax(150px, 1fr) 100px 80px;
}

.payment-detail-row.payment-focus {
  background: #fff9e6;
  box-shadow: inset 3px 0 0 #f5a623;
}

.payment-detail-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: calc(11px * var(--font-scale));
}

.payment-group-row,
.payment-group-row strong,
.payment-group-row b,
.payment-group-row .payment-payee::before,
.payment-group-row .payment-tag,
.payment-group-row .payment-status,
.payment-detail-row,
.payment-detail-row strong,
.payment-detail-row b,
.payment-detail-row .chip,
.payment-detail-row .mini-action-button {
  font-weight: 400;
}

.mini-action-button.secondary {
  background: #f7f8fa;
  color: var(--muted);
}

.paid-text {
  color: #00835d;
}

.danger-text {
  color: #d90429;
}

.customer-detail-overlay {
  position: fixed;
  z-index: 78;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(820px, 58vw);
  background: rgba(247, 249, 251, 0.68);
  backdrop-filter: blur(5px);
}

.customer-detail-drawer {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -18px 0 40px rgba(38, 52, 66, 0.14);
  overflow: hidden;
}

.customer-detail-body {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
  padding: 18px 20px 20px;
  overflow: auto;
}

.customer-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  align-content: start;
}

.customer-editor-grid label {
  min-width: 0;
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.customer-editor-grid input,
.customer-editor-grid select,
.customer-editor-grid textarea {
  width: 100%;
  margin-top: 6px;
}

.customer-editor-grid .supplier-customer-select {
  position: relative;
  margin-top: 6px;
}

.supplier-assigned-field {
  min-width: 0;
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.supplier-field-label {
  display: block;
}

.supplier-customer-select summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-customer-select summary::-webkit-details-marker {
  display: none;
}

.supplier-customer-select summary::after {
  content: "v";
  flex: 0 0 auto;
  margin-left: 10px;
  color: var(--muted);
  font-size: calc(11px * var(--font-scale));
}

.supplier-customer-select[open] summary::after {
  transform: rotate(180deg);
}

.supplier-customer-options {
  display: grid;
  gap: 4px;
  max-height: 180px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: auto;
  box-shadow: 0 14px 28px rgba(38, 52, 66, 0.12);
}

.supplier-customer-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ink);
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
}

.supplier-customer-option:hover {
  background: #f6f8fb;
}

.supplier-customer-option input {
  width: auto;
  margin: 0;
}

.supplier-customer-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-customer-empty {
  padding: 8px;
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: calc(11px * var(--font-scale));
  font-weight: 700;
  line-height: 1.35;
}

.customer-editor-wide {
  grid-column: 1 / -1;
}

.customer-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.customer-editor-actions .icon-button {
  min-width: 96px;
}

.flow-panel {
  padding: 22px;
}

.shipment-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 8px;
  min-height: 280px;
  padding: 100px 24px 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.shipment-flow::before {
  position: absolute;
  right: 36px;
  bottom: 86px;
  left: 36px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f7c948, #1ca3ec, #8f6cff, #16c79a);
  content: "";
}

.flow-step {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 12px;
  min-height: 140px;
}

.flow-node {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #ffffff;
}

.flow-node::before {
  position: absolute;
  inset: 9px 7px;
  border: 2px solid currentColor;
  border-top: 0;
  content: "";
}

.flow-label {
  color: var(--ink);
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
}

.flow-cards {
  position: absolute;
  bottom: 144px;
  display: grid;
  gap: 7px;
  min-width: 128px;
  transform: translateX(-18px);
}

.flow-mini-card {
  padding: 7px 8px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: #ffffff;
  font-size: calc(11px * var(--font-scale));
  box-shadow: 0 8px 20px rgba(38, 52, 66, 0.09);
}

.flow-mini-card strong {
  display: block;
  color: var(--ink);
}

.flow-mini-card span {
  color: var(--muted);
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.client-feature-notice {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.client-feature-notice > div {
  max-width: 760px;
  text-align: center;
}

.client-feature-notice h2 {
  margin: 8px 0 12px;
  font-size: calc(26px * var(--font-scale));
  line-height: 1.2;
}

.client-feature-notice p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: calc(15px * var(--font-scale));
  line-height: 1.65;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 70px repeat(5, minmax(135px, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.calendar-cell {
  min-height: 88px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar-cell:nth-child(6n) {
  border-right: 0;
}

.calendar-head {
  min-height: 64px;
  background: #fbfcfd;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.calendar-time {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
}

.calendar-event {
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 10px;
  border: 2px solid #03c988;
  border-radius: 8px;
  background: #ecfff7;
  font-size: calc(12px * var(--font-scale));
}

.calendar-event.rescheduled {
  border-color: #d946ef;
  background: #faf1ff;
}

.calendar-event.pending {
  border-color: #7db7ff;
  background: #eef6ff;
}

.side-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.side-list-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  font-size: calc(13px * var(--font-scale));
}

.qc-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--surface);
  max-width: 100%;
  min-width: 0;
  scrollbar-gutter: stable both-edges;
}

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

.qc-group-header,
.qc-row,
.qc-detail-row {
  display: grid;
  grid-template-columns: 38px minmax(120px, 1.1fr) minmax(72px, 0.7fr) minmax(118px, 0.9fr) minmax(150px, 1.1fr) minmax(140px, 1fr) minmax(78px, 0.6fr) minmax(78px, 0.5fr) minmax(150px, 1.1fr);
  gap: clamp(6px, 0.7vw, 10px);
  align-items: center;
  width: 100%;
  min-width: min(1040px, 100%);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.qc-group-header {
  grid-template-columns: 46px 1fr;
  padding: 9px 14px;
  font-weight: 400;
  background: #fbfcfd;
}

.qc-group-header strong {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
  justify-self: start;
  min-width: 0;
}

.qc-group-toggle,
.qc-row-toggle {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  line-height: 1;
}

.qc-chevron {
  display: block;
  width: 5.5px;
  height: 5.5px;
  border-right: 1.2px solid currentColor;
  border-bottom: 1.2px solid currentColor;
  transform: rotate(45deg) translate(-0.5px, -0.5px);
  transform-origin: center;
}

.qc-group-toggle[aria-expanded="false"] .qc-chevron,
.qc-row-toggle[aria-expanded="false"] .qc-chevron {
  transform: rotate(-45deg) translate(-0.5px, -0.5px);
}

.qc-group-toggle:hover,
.qc-row-toggle:hover {
  background: #eef3f8;
  color: var(--blue);
}

.qc-group.collapsed .qc-group-header {
  border-bottom: 0;
}

.qc-row {
  grid-template-columns:
    46px
    minmax(108px, 0.92fr)
    minmax(86px, 0.68fr)
    minmax(154px, 1.15fr)
    minmax(148px, 1.05fr)
    minmax(88px, 0.65fr)
    minmax(64px, 0.45fr)
    minmax(136px, 0.9fr)
    minmax(130px, 0.95fr);
  gap: clamp(5px, 0.55vw, 9px);
  min-width: min(1160px, 100%);
  min-height: 40px;
  padding: 5px 14px;
  background: #ffffff;
}

.qc-row.scheduled {
  background: #eef7ff;
  box-shadow: inset 3px 0 0 #2f80ed;
}

.qc-row.passed {
  background: #f8fafc;
}

.qc-row > strong,
.qc-row > span {
  line-height: 1.2;
}

.qc-po-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink);
  font-size: inherit;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
  justify-self: start;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
}

.qc-po-number > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qc-inline-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(4px, 0.45vw, 7px);
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: calc(11px * var(--font-scale));
  font-weight: 400;
  min-width: 0;
}

.qc-scheduled-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 8px;
  border: 1px solid #c7d7ff;
  border-radius: 999px;
  background: #f3f7ff;
  color: #0047ff;
  font-size: calc(11px * var(--font-scale));
  font-weight: 400;
  line-height: 1;
}

.qc-inline-field input,
.qc-inline-field select,
.qc-currency-select {
  min-width: 0;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 3px 8px;
  font: inherit;
  font-size: calc(13px * var(--font-scale));
  font-weight: 400;
}

.qc-inline-field input[type="date"],
.qc-inline-field input[type="text"] {
  min-width: 112px;
}

.qc-currency-select {
  width: 100%;
  min-width: 58px;
}

.qc-row .button-row {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.qc-row .icon-button {
  min-height: 28px;
  padding: 0 8px;
  white-space: nowrap;
}

@media (max-width: 1320px) {
  .qc-inspection-shell {
    --font-scale: 0.7;
  }

  .qc-inspection-shell .module-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .qc-inspection-shell .module-actions {
    justify-self: start;
    justify-content: flex-start;
    max-width: 100%;
  }

  .qc-row {
    grid-template-columns:
      46px
      minmax(82px, 0.78fr)
      minmax(62px, 0.5fr)
      minmax(110px, 0.86fr)
      minmax(110px, 0.86fr)
      minmax(58px, 0.42fr)
      minmax(50px, 0.36fr)
      minmax(96px, 0.64fr)
      minmax(96px, 0.66fr);
    gap: 4px;
    min-width: min(980px, 100%);
    padding: 6px 14px;
  }

  .qc-inline-field {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px;
  }

  .qc-inline-field input,
  .qc-inline-field select,
  .qc-currency-select {
    min-height: 28px;
    padding: 3px 6px;
  }

  .qc-inline-field input[type="date"],
  .qc-inline-field input[type="text"] {
    min-width: 92px;
  }

  .qc-row .icon-button {
    min-height: 28px;
    padding: 0 6px;
  }
}

@media (max-width: 1080px) {
  .qc-group {
    overflow-x: auto;
  }

  .qc-group-header,
  .qc-row,
  .qc-detail-row {
    min-width: 860px;
  }
}

.qc-detail-row {
  grid-template-columns: 46px 130px 260px 70px 1fr 220px;
  background: #ffffff;
}

.qc-deadline-wrap {
  display: grid;
  gap: 4px;
  align-items: start;
  width: 112px;
  max-width: 100%;
  min-width: 0;
}

.qc-deadline {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: calc(11px * var(--font-scale));
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;
}

.qc-deadline::before {
  content: none;
}

.qc-deadline-overdue,
.qc-deadline-today,
.qc-deadline-urgent {
  color: #ff3347;
}

.qc-deadline-warn {
  color: #936400;
}

.qc-deadline-ok {
  color: #14745d;
}

.qc-deadline-done,
.qc-deadline-neutral {
  color: var(--muted);
}

.progress-track {
  width: 112px;
  max-width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #eef0f2;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #ff3347;
}

.progress-fill.ok {
  background: #1f8a70;
}

.progress-fill.warn {
  background: #e0a400;
}

.progress-fill.overdue,
.progress-fill.today,
.progress-fill.urgent {
  background: #ff3347;
}

.progress-fill.done,
.progress-fill.neutral {
  background: #9aa4b2;
}

.defect-catalog-shell .module-header p {
  max-width: 960px;
  line-height: 1.55;
}

.defect-toolbar .search-box {
  min-width: min(420px, 100%);
}

.defect-client-preview {
  min-height: 360px;
}

.defect-client-preview p {
  font-size: calc(18px * var(--font-scale));
}

.defect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.defect-grid .empty-state {
  grid-column: 1 / -1;
}

.defect-card {
  display: grid;
  gap: 12px;
  min-height: 230px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(38, 52, 66, 0.06);
}

.defect-card-editable {
  cursor: pointer;
}

.defect-card-editable:hover {
  border-color: #b8c5cf;
  box-shadow: 0 12px 26px rgba(38, 52, 66, 0.1);
}

.defect-card h3 {
  margin: 0;
  font-size: calc(16px * var(--font-scale));
}

.defect-card p {
  margin: 0;
  color: var(--muted);
  font-size: calc(13px * var(--font-scale));
  line-height: 1.45;
}

.defect-thumb {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.02)),
    repeating-linear-gradient(45deg, #d8dde3 0 8px, #eef1f4 8px 16px);
  border: 1px solid var(--line);
  overflow: hidden;
}

.defect-thumb img,
.defect-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.defect-detail-overlay {
  grid-template-columns: minmax(220px, 1fr) minmax(900px, 68vw);
}

.defect-admin-layout {
  grid-template-columns: minmax(220px, 0.55fr) minmax(440px, 1.25fr) minmax(140px, 0.35fr);
}

.defect-wide-field textarea {
  min-height: 128px;
}

.task-board {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.task-topic {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.task-topic h3 {
  margin: 0;
  font-size: calc(15px * var(--font-scale));
}

.task-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 130px 120px 120px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: calc(14px * var(--font-scale));
}

.task-row.task-row-admin {
  grid-template-columns: minmax(220px, 1fr) 130px 130px 120px 120px 88px;
}

.task-inline-select {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  font-size: calc(13px * var(--font-scale));
}

.task-row-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.task-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 78;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(780px, 56vw);
  background: rgba(247, 249, 251, 0.68);
  backdrop-filter: blur(5px);
}

.task-detail-drawer {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -18px 0 40px rgba(38, 52, 66, 0.14);
  overflow: hidden;
}

.task-detail-body {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
  padding: 18px 20px 20px;
  overflow: auto;
}

.task-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  align-content: start;
}

.task-editor-grid label {
  color: var(--muted);
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
}

.task-editor-grid input,
.task-editor-grid select,
.task-editor-grid textarea {
  width: 100%;
  margin-top: 6px;
}

.task-editor-wide {
  grid-column: 1 / -1;
}

.task-upload-drop {
  margin-top: 8px;
  min-height: 70px;
}

.task-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.task-upload-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f7fafc;
}

.task-upload-grid img {
  display: block;
  width: 100%;
  height: 84px;
  object-fit: cover;
}

.task-upload-grid figcaption {
  padding: 6px;
  color: var(--muted);
  font-size: calc(10px * var(--font-scale));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.task-image-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.task-thumb {
  display: block;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
  overflow: hidden;
}

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

.muted-text {
  color: var(--muted);
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 94px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #172026;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.ai-assistant {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  font-family: inherit;
}

.ai-assistant-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #1479d6;
  border-radius: 14px;
  background: linear-gradient(145deg, #0969da 0%, #0ea5e9 52%, #10b981 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(10, 103, 210, 0.22);
  cursor: pointer;
}

.ai-assistant-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-assistant-toggle strong {
  color: rgba(255, 255, 255, 0.92);
  font-size: calc(8px * var(--font-scale));
  font-weight: 700;
  line-height: 1;
}

.ai-assistant-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto;
  width: min(390px, calc(100vw - 32px));
  max-height: min(640px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(21, 32, 45, 0.22);
}

.ai-assistant-panel[hidden] {
  display: none !important;
}

.ai-assistant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.ai-assistant-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-assistant-title-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(145deg, #eaf3ff 0%, #dcfce7 100%);
  color: #0969da;
}

.ai-assistant-title-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-assistant-header h2 {
  margin: 2px 0 0;
  font-size: calc(18px * var(--font-scale));
}

.ai-assistant-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  overflow: auto;
  background: #f7fafc;
}

.ai-message {
  display: grid;
  gap: 4px;
  max-width: 86%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.ai-message.user {
  justify-self: end;
  border-color: #bfd7ff;
  background: #eef5ff;
}

.ai-message strong {
  color: var(--muted);
  font-size: calc(11px * var(--font-scale));
  text-transform: none;
}

.ai-message p {
  margin: 0;
  font-size: calc(13px * var(--font-scale));
  line-height: 1.45;
  white-space: pre-wrap;
}

.ai-assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.ai-assistant-form input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
}

.ai-assistant-form button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.ai-assistant-note {
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: calc(11px * var(--font-scale));
}

.placeholder-page {
  min-height: calc(100vh - 70px);
  align-content: center;
}

.placeholder-panel {
  max-width: 620px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(38, 52, 66, 0.06);
}

.placeholder-panel h1 {
  margin: 16px 0 8px;
  font-size: var(--aupeak-page-title-size);
  font-weight: 700;
}

.placeholder-panel p {
  margin: 0;
  color: var(--muted);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.6;
}

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

  .content-grid,
  #purchaseOrdersPage.maintain-open .po-main-grid,
  .lower-grid,
  .client-layout,
  .split-grid,
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .product-detail-overlay {
    grid-template-columns: 1fr;
  }

  .quotation-detail-overlay {
    grid-template-columns: 1fr;
  }

  .product-detail-scrim {
    display: none;
  }

  .quotation-detail-scrim {
    display: none;
  }

  .product-detail-drawer {
    width: 100vw;
  }

  .quotation-detail-drawer {
    width: 100vw;
  }

  .product-admin-layout,
  .product-admin-lower,
  .quotation-admin-layout,
  .order-admin-layout,
  .quotation-client-layout {
    grid-template-columns: 1fr;
  }

  .product-admin-lower .product-admin-controls,
  .product-admin-lower .product-specification-field {
    grid-column: auto;
    grid-row: auto;
  }

  .quotation-toolbar,
  .client-mode .quotation-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-editor-grid,
  .quotation-editor-grid,
  .order-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-summary-grid {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    gap: 18px;
  }

  .search-box {
    grid-template-columns: 20px 1fr;
  }

  .upload-strip,
  .form-two,
  .import-grid,
  .task-row,
  .task-row.task-row-admin {
    grid-template-columns: 1fr;
  }

  .module-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-toolbar {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .quotation-toolbar,
  .client-mode .quotation-toolbar {
    grid-template-columns: 1fr;
  }

  .product-editor-grid,
  .quotation-editor-grid,
  .order-editor-grid,
  .quotation-client-summary {
    grid-template-columns: 1fr;
  }

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

  .calendar-grid {
    grid-template-columns: 56px repeat(5, 160px);
    overflow-x: auto;
  }

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

@media (max-width: 560px) {
  .sidebar {
    padding: 16px;
  }

  .page-view,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .dashboard-grid,
  .button-row.full {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .doc-top,
  .client-order-top {
    align-items: flex-start;
    flex-direction: column;
  }
}
