:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #eef3f2;
  --ink: #17201d;
  --muted: #63736e;
  --line: #d8e0dd;
  --primary: #146b5f;
  --primary-dark: #0e4c44;
  --green: #146b5f;
  --accent: #b76b2b;
  --danger: #b42318;
  --danger-bg: #fff0ed;
  --shadow: 0 18px 50px rgba(23, 32, 29, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  background: #10231f;
  color: #f8fbfa;
  padding: 24px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: #1c5a51;
  font-weight: 800;
}

.brand-title {
  font-weight: 800;
}

.brand-subtitle {
  color: rgba(248, 251, 250, 0.62);
  font-size: 12px;
  margin-top: 2px;
}

.brand-version {
  margin-top: 5px;
  color: rgba(248, 251, 250, 0.78);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.module-nav {
  display: grid;
  gap: 6px;
}

.nav-group {
  min-width: 0;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: rgba(248, 251, 250, 0.78);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.nav-group-toggle:hover,
.nav-group.contains-active > .nav-group-toggle {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-group-chevron {
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.nav-group.open .nav-group-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.nav-group-items {
  display: grid;
  gap: 3px;
  padding: 3px 0 5px 10px;
}

.nav-group-items[hidden] {
  display: none;
}

.nav-item {
  color: rgba(248, 251, 250, 0.78);
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.nav-item.nav-subitem {
  margin-left: 2em;
  padding-left: 12px;
  font-size: 13px;
  color: rgba(248, 251, 250, 0.68);
}

.nav-group-link {
  min-height: 38px;
  padding: 9px 12px;
  color: rgba(248, 251, 250, 0.68);
  font-size: 13px;
}

.nav-direct {
  display: block;
  font-weight: 700;
}

.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-item.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.sidebar-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-account-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-account-identity strong,
.sidebar-account-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-identity strong {
  font-size: 13px;
}

.sidebar-account-identity span {
  color: rgba(248, 251, 250, 0.62);
  font-size: 10px;
}

.sidebar-logout {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #f8fbfa;
  background: transparent;
  cursor: pointer;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.auth-shell {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(340px, 1.2fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.auth-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 42px 36px;
  color: #f8fbfa;
  background: #173a33;
}

.auth-brand .brand-title {
  font-size: 21px;
}

.auth-brand-mark {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  font-size: 18px;
}

.auth-panel {
  padding: 42px;
}

.auth-panel header {
  margin-bottom: 26px;
}

.auth-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.auth-panel form,
.account-panel {
  display: grid;
  gap: 16px;
}

.auth-panel label,
.account-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.form-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.form-message.error {
  color: #a92d2d;
}

.form-message.success {
  color: var(--primary-dark);
}

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

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

.account-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.account-users-section {
  display: block;
  padding: 20px;
}

.account-users-table input,
.account-users-table select {
  min-width: 120px;
}

.account-users-table td:first-child strong {
  display: block;
}

.account-self-label {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.account-active-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  font-size: 15px;
  line-height: 1.35;
}

.muted {
  color: var(--muted);
  margin-top: 6px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.database-actions {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 8px;
  align-items: center;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.database-actions .button {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  vertical-align: middle;
  appearance: none;
}

.database-actions .button.ghost {
  font-weight: 900;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tab-button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tab-button.active {
  background: var(--primary);
  color: #ffffff;
}

.button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
}

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

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

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
}

.button.secondary:hover {
  background: var(--surface-2);
}

.button.product-action {
  position: relative;
  min-width: 150px;
  overflow: hidden;
  font-weight: 850;
  border-width: 0;
}

.button.product-action::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--action-color);
}

.button.product-action.inquiry {
  --action-color: #1f5fbf;
  --action-bg: #2f6fd6;
  --action-soft: #d7e6ff;
  --action-border: #2f6fd6;
}

.button.product-action.supply {
  --action-color: #0f765c;
  --action-bg: #168067;
  --action-soft: #d8f1e8;
  --action-border: #168067;
}

.button.product-action.outline {
  border: 2px solid var(--action-border) !important;
  background: var(--action-soft) !important;
  color: var(--action-color) !important;
}

.button.product-action.outline:hover {
  border-color: var(--action-color);
  background: #c8dcff;
}

.button.product-action.supply.outline:hover {
  background: #c5eadf;
}

.button.product-action.solid {
  border: 2px solid var(--action-bg) !important;
  background: var(--action-bg) !important;
  color: #ffffff !important;
}

.button.product-action.solid:hover {
  filter: brightness(0.92);
}

.button.small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.button.match-action {
  min-width: 128px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(20, 107, 95, 0.18);
}

.button.danger {
  color: var(--danger);
}

.button.ghost {
  border-color: #f1c7c0;
  background: var(--danger-bg);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-strip.owner-summary {
  grid-template-columns: repeat(2, minmax(160px, 240px));
}

.summary-strip.supplier-summary-strip {
  grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) minmax(320px, 1fr);
  align-items: stretch;
}

.summary-item {
  min-height: 82px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.industry-filter-panel {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.industry-filter-panel p {
  margin: 0;
  font-size: 12px;
}

.industry-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.industry-filter-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
}

.industry-filter-button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(20, 107, 95, 0.16);
}

.summary-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.summary-item strong {
  font-size: 26px;
}

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

.workspace.product-list-only {
  grid-template-columns: minmax(0, 1fr);
}

.workspace.product-list-only .detail-panel {
  display: none;
}

.workspace.customer-list-only {
  grid-template-columns: minmax(0, 1fr);
}

.workspace.customer-list-only .detail-panel {
  display: none;
}

.workspace.supplier-list-only {
  grid-template-columns: minmax(0, 1fr);
}

.workspace.supplier-list-only .detail-panel {
  display: none;
}

.workspace.quote-list-only {
  grid-template-columns: minmax(0, 1fr);
}

.workspace.quote-list-only .quote-detail-panel {
  display: none;
}

.list-panel,
.detail-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.toolbar.product-toolbar {
  grid-template-columns: minmax(240px, 1fr) 160px 180px;
}

.toolbar.supply-product-toolbar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.toolbar.owners-toolbar {
  grid-template-columns: minmax(240px, 1fr);
}

.owners-workspace {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.owners-table {
  min-width: 680px;
}

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

.logistics-workspace .list-panel,
.logistics-workspace .logistics-detail-panel {
  min-width: 0;
}

.logistics-workspace .table-wrap {
  overflow-x: hidden;
}

.logistics-workspace .list-panel table {
  min-width: 0;
  table-layout: fixed;
}

.logistics-workspace .list-panel th,
.logistics-workspace .list-panel td {
  padding: 11px 10px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.logistics-workspace .list-panel th:nth-child(1),
.logistics-workspace .list-panel td:nth-child(1) {
  width: 14%;
}

.logistics-workspace .list-panel th:nth-child(2),
.logistics-workspace .list-panel td:nth-child(2) {
  width: 16%;
}

.logistics-workspace .list-panel th:nth-child(3),
.logistics-workspace .list-panel td:nth-child(3) {
  width: 18%;
}

.logistics-workspace .list-panel th:nth-child(4),
.logistics-workspace .list-panel td:nth-child(4) {
  width: 18%;
}

.logistics-workspace .list-panel th:nth-child(5),
.logistics-workspace .list-panel td:nth-child(5),
.logistics-workspace .list-panel th:nth-child(6),
.logistics-workspace .list-panel td:nth-child(6) {
  width: 9%;
}

.logistics-workspace .list-panel th:nth-child(7),
.logistics-workspace .list-panel td:nth-child(7) {
  width: 10%;
}

.logistics-workspace .list-panel th:nth-child(8),
.logistics-workspace .list-panel td:nth-child(8) {
  width: 6%;
}

.rfq-toolbar {
  grid-template-columns: minmax(240px, 1fr) 170px;
}

.rfq-table {
  min-width: 900px;
}

.rfq-workspace {
  grid-template-columns: minmax(0, 1fr) 460px;
}

.rfq-workspace.rfq-list-only {
  grid-template-columns: minmax(0, 1fr);
}

.rfq-workspace.rfq-list-only .rfq-detail-panel {
  display: none;
}

.rfq-detail-panel {
  min-height: 640px;
}

.database-workspace {
  grid-template-columns: minmax(0, 1fr) 420px;
}

.database-workspace .database-backup-panel {
  grid-column: 1;
}

.database-table {
  min-width: 780px;
}

.backup-table {
  min-width: 720px;
}

.database-notes {
  min-height: 360px;
}

.section-heading {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.section-heading p {
  margin: 0;
  overflow-wrap: anywhere;
}

label span,
.search-box span,
.filter-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 40px;
  padding: 0 11px;
}

textarea {
  resize: vertical;
  min-height: 40px;
  padding: 10px 11px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 107, 95, 0.12);
}

.table-wrap {
  position: relative;
  overflow: auto;
  max-width: 100%;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  background: #fbfcfc;
  font-size: 12px;
  font-weight: 800;
}

tr:hover td {
  background: #f7faf9;
}

tbody tr[data-id] {
  cursor: pointer;
}

tr.selected td {
  background: #edf7f5;
}

/* One RFQ keeps the same calm project tint throughout the downstream workflow. */
tr.project-highlight-row > td {
  background-color: var(--project-row-background);
  transition: background-color 0.16s ease;
}

tr.project-highlight-row:hover > td {
  background-color: var(--project-row-hover);
}

tr.project-highlight-row.selected > td {
  background-color: var(--project-row-selected);
}

tr.project-highlight-row > td:first-child {
  box-shadow: inset 3px 0 0 var(--project-row-accent);
}

.company-cell {
  display: grid;
  gap: 3px;
}

.company-cell strong {
  font-size: 14px;
}

.company-cell span {
  color: var(--muted);
  font-size: 12px;
}

.title-link {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.title-link strong {
  font-size: 14px;
}

.title-link span {
  color: var(--muted);
  font-size: 12px;
}

.title-link:hover strong {
  color: var(--primary);
  text-decoration: underline;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf3f1;
  color: #36514a;
  font-size: 12px;
  font-weight: 700;
}

.status-pill,
.code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.code-pill {
  background: #edf3f1;
  color: #36514a;
}

.status-pill {
  background: #e7f5ef;
  color: #126141;
}

.status-pill.draft {
  background: #f3ead8;
  color: #7a5418;
}

.status-pill.pending_confirm {
  background: #e7f5ef;
  color: #126141;
}

.status-pill.modified {
  background: #eef3f1;
  color: #36514a;
}

.status-pill.inactive {
  background: #eef0f2;
  color: #5b6570;
}

.status-pill.blacklisted {
  background: var(--danger-bg);
  color: var(--danger);
}

.status-pill.archived {
  background: #f2ecdf;
  color: #805a17;
}

.status-control-wrap {
  display: inline-flex;
  align-items: center;
}

.status-select-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.status-select-label.compact {
  gap: 0;
}

.status-select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 30px 4px 12px;
  background: #e7f5ef;
  color: #126141;
  font-size: 12px;
  font-weight: 900;
}

.row-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf9;
  padding: 12px 14px;
  margin: 0 0 12px;
}

.bulk-actions > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.bulk-actions strong {
  color: var(--ink);
  font-size: 14px;
}

.bulk-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bulk-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.select-column {
  width: 44px;
  text-align: center;
}

.bulk-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  padding: 4px;
}

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

.quick-status-select {
  min-height: 34px;
  width: auto;
  min-width: 104px;
  padding: 0 28px 0 14px;
  border-radius: 999px;
  border-color: #cfe0dc;
  background-color: var(--soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.quick-status-select.status-draft {
  border-color: #e0c99c;
  background-color: #f3ead8;
  color: #7a5418;
}

.quick-status-select.status-pending_confirm,
.quick-status-select.status-accepted {
  border-color: #cfe0dc;
  background-color: var(--soft);
  color: var(--primary);
}

.quick-status-select.status-modified {
  border-color: #ccd8d5;
  background-color: #eef3f1;
  color: #36514a;
}

.quick-status-select.status-archived {
  border-color: #dfcfb4;
  background-color: #f2ecdf;
  color: #805a17;
}

.detail-panel {
  min-height: 520px;
  position: sticky;
  top: 18px;
  overflow: hidden;
}

.detail-empty {
  display: grid;
  place-items: center;
  min-height: 520px;
  color: var(--muted);
}

.detail-content {
  padding: 18px;
}

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

.detail-header h2 {
  margin-top: 8px;
}

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

.detail-grid div {
  min-width: 0;
}

.detail-grid .wide {
  grid-column: 1 / -1;
}

.config-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(23, 32, 29, 0.05);
}

.config-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.config-panel-head h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.seller-profile-grid {
  margin-bottom: 0;
}

.seller-profile-logo {
  display: block;
  max-width: 160px;
  max-height: 62px;
  object-fit: contain;
}

.logo-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 12px;
  align-items: stretch;
}

.logo-upload-box {
  min-height: 112px;
}

.logo-upload-box input {
  display: none;
}

.logo-preview-box {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--muted);
  font-weight: 900;
  overflow: hidden;
  padding: 10px;
}

.logo-preview-box img {
  max-width: 100%;
  max-height: 92px;
  object-fit: contain;
}

.product-media-grid,
.product-attachment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: stretch;
}

.product-attachment-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.product-file-box {
  min-height: 112px;
}

.product-media-preview {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--muted);
  font-weight: 900;
  overflow: hidden;
  padding: 10px;
  text-align: center;
}

.product-media-preview img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
}

.product-asset-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.product-asset-panel h3 {
  margin: 0 0 8px;
}

.product-image-view {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  overflow: hidden;
  padding: 12px;
}

.product-image-view img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.product-spec-download {
  width: fit-content;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.spec-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.spec-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.48fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfc;
}

.spec-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.spec-item strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.compact-lines {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.compact-line {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1.2fr) minmax(150px, 1fr) minmax(90px, auto);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfcfc;
}

.compact-line span {
  color: var(--muted);
  font-weight: 900;
}

.compact-line strong,
.compact-line b {
  color: var(--ink);
}

.compact-line em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.rfq-item-list,
.rfq-editor-items {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.field-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 6px;
}

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

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

.rfq-product-checklist {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.checklist-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
}

.checklist-row:hover {
  border-color: #b9ccc7;
}

.checklist-row input {
  margin-top: 3px;
}

.checklist-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.checklist-row strong,
.checklist-row small {
  overflow-wrap: anywhere;
}

.checklist-row small {
  color: var(--muted);
  font-weight: 700;
}

.rfq-item-card,
.rfq-editor-item,
.rfq-report {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.rfq-price-summary {
  margin-top: 10px;
  overflow-x: auto;
}

.mini-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.mini-table th,
.mini-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.mini-table th {
  background: #eef6f4;
  color: #10231f;
}

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

.mini-table tfoot td {
  background: #f7faf9;
  font-weight: 900;
}

.detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 12px 0 18px;
}

.print-actions {
  display: flex;
  justify-content: flex-end;
  padding: 12px 18px 0;
  background: #ffffff;
}

@page {
  size: A4 portrait;
  margin: 8mm;
}

@media print {
  body {
    background: #ffffff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sidebar,
  .topbar,
  .summary-strip,
  .list-panel,
  .detail-header,
  .detail-grid,
  .detail-panel h3,
  .rfq-report,
  .detail-actions,
  .export-tabs,
  .export-actions,
  .manual-document-audit,
  .modal-backdrop {
    display: none !important;
  }

  .app-shell,
  .main,
  .workspace,
  .detail-panel,
  .detail-content,
  .quotation-preview {
    display: block !important;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
    background: #ffffff;
  }

  .quotation-sheet {
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }
}

.pdf-mode {
  background: #ffffff;
  color: #10231f;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.pdf-mode .quotation-sheet {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.pdf-mode .quotation-title-row {
  padding-bottom: 16px;
  margin-bottom: 8px;
}

.pdf-mode .quotation-title-row h2 {
  font-size: 24px;
}

.pdf-mode .quotation-logo {
  width: 165px;
  height: 82px;
  padding: 0;
  border-radius: 6px;
  overflow: visible;
}

.pdf-mode .quotation-logo img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  object-position: center center;
  transform: none;
}

.pdf-mode .quotation-info-grid,
.pdf-mode .quotation-bottom-grid {
  gap: 6px;
  margin-bottom: 7px;
}

.pdf-mode .quotation-box h4 {
  padding: 5px 7px;
  font-size: 10px;
}

.pdf-mode .quotation-field {
  grid-template-columns: minmax(124px, 0.4fr) minmax(0, 1fr);
  gap: 5px;
  padding: 4px 7px;
  font-size: 9px;
  line-height: 1.25;
}

.pdf-mode .quotation-info-grid .quotation-field span {
  white-space: nowrap;
}

.pdf-mode .quotation-table-section {
  margin: 7px 0;
  break-inside: auto;
  page-break-inside: auto;
}

.pdf-mode .quotation-table-section h4 {
  padding: 6px 7px;
  font-size: 10px;
  break-after: avoid;
  page-break-after: avoid;
}

.pdf-mode .quotation-product-table {
  min-width: 0;
}

.pdf-mode .quotation-product-table .col-no {
  width: 28px;
}

.pdf-mode .quotation-product-table .col-description {
  width: 26%;
}

.pdf-mode .quotation-product-table .col-model {
  width: 20%;
}

.pdf-mode .quotation-product-table .col-qty {
  width: 42px;
}

.pdf-mode .quotation-product-table .col-unit {
  width: 42px;
}

.pdf-mode .quotation-product-table .col-price {
  width: 72px;
}

.pdf-mode .quotation-product-table .col-amount {
  width: 82px;
}

.pdf-mode .quotation-product-table .col-remark {
  width: 58px;
}

.pdf-mode .quotation-product-table th,
.pdf-mode .quotation-product-table td {
  padding: 4px 5px;
  font-size: 9px;
  line-height: 1.22;
}

.pdf-mode .quotation-product-table th {
  font-size: 9px;
}

.pdf-mode .quotation-product-table th em {
  font-size: 8px;
}

.pdf-mode .quotation-product-table thead {
  display: table-header-group;
}

.pdf-mode .quotation-product-table tfoot {
  display: table-row-group;
}

.pdf-mode .quotation-remarks {
  padding: 6px 7px;
  margin-bottom: 7px;
}

.pdf-mode .quotation-remarks strong,
.pdf-mode .quotation-remarks p {
  font-size: 9px;
}

.quote-lines {
  overflow-x: auto;
}

.quote-lines-table {
  min-width: 760px;
}

.quote-line-edit-table {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  overflow-x: auto;
}

.quote-line-edit-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.75fr) minmax(120px, 0.75fr) minmax(240px, 1.35fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(130px, 0.75fr);
  min-width: 1160px;
  background: #ffffff;
}

.quote-line-edit-row > div {
  padding: 9px;
}

.quote-line-edit-row.header > div {
  background: #eef6f4;
  color: #10231f;
  font-size: 13px;
  font-weight: 900;
}

.quote-line-edit-row input,
.quote-line-edit-row textarea {
  width: 100%;
}

.quote-line-edit-row input[readonly] {
  color: var(--muted);
  background: #f7faf9;
}

.quote-price-compare-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-price-compare-table {
  min-width: 1080px;
}

.quote-price-compare-table th,
.quote-price-compare-table td {
  white-space: normal;
}

.quote-price-compare-table tfoot td {
  background: #eef6f4;
  font-weight: 900;
}

.positive-profit {
  color: var(--primary);
  font-weight: 900;
}

.negative-profit {
  color: var(--danger);
  font-weight: 900;
}

.quote-line-edit-row [data-field="quantityUnit"] {
  margin-top: 6px;
}

.manual-pi-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.manual-pi-version {
  min-width: 320px;
  flex: 1 1 360px;
}

.manual-pi-version select {
  width: 100%;
}

.manual-pi-reason,
.manual-pi-note {
  display: grid;
  gap: 6px;
}

.manual-pi-basic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.manual-pi-line-editor .quote-line-edit-row {
  grid-template-columns: minmax(260px, 1.4fr) minmax(150px, 0.8fr) minmax(100px, 0.5fr) minmax(100px, 0.5fr) minmax(120px, 0.6fr) minmax(160px, 0.8fr);
  min-width: 960px;
}

.package-editor {
  overflow-x: auto;
}

.package-line-edit-table {
  display: grid;
  gap: 1px;
  min-width: 1120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}

.package-line-edit-row {
  display: grid;
  grid-template-columns: 42px minmax(130px, 1fr) 82px 86px 86px 86px 110px 100px 100px minmax(130px, 1fr) 56px;
  background: #ffffff;
}

.package-line-edit-row > div {
  min-width: 0;
  padding: 8px;
}

.package-line-edit-row.header > div {
  background: #eef6f4;
  color: #10231f;
  font-size: 12px;
  font-weight: 900;
}

.package-line-edit-row input {
  width: 100%;
  min-width: 0;
}

.package-content-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  background: #fbfcfc;
  padding: 10px 12px 12px 50px;
}

.package-content-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding-top: 8px;
}

.package-content-selector {
  display: grid;
  gap: 8px;
}

.package-content-option {
  display: grid;
  grid-template-columns: 22px minmax(220px, 1fr) 110px 46px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.package-content-option span {
  display: grid;
  gap: 2px;
}

.package-content-option strong {
  color: var(--ink);
  font-size: 13px;
}

.package-content-option em,
.package-content-option b,
.package-content-empty {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.package-content-qty {
  min-height: 34px;
}

.pre-line {
  white-space: pre-line;
}

.package-line-no {
  color: var(--ink);
  font-weight: 900;
}

.package-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.package-summary {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.logistics-package-summary-wrap {
  margin-bottom: 12px;
  overflow-x: hidden;
}

.logistics-package-summary-table {
  min-width: 0;
  table-layout: fixed;
}

.logistics-package-summary-table th,
.logistics-package-summary-table td {
  padding: 8px 8px;
  font-size: 12px;
  line-height: 1.25;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.logistics-package-summary-table th:nth-child(1),
.logistics-package-summary-table td:nth-child(1) {
  width: 7%;
}

.logistics-package-summary-table th:nth-child(2),
.logistics-package-summary-table td:nth-child(2) {
  width: 12%;
}

.logistics-package-summary-table th:nth-child(3),
.logistics-package-summary-table td:nth-child(3) {
  width: 24%;
}

.logistics-package-summary-table th:nth-child(4),
.logistics-package-summary-table td:nth-child(4),
.logistics-package-summary-table th:nth-child(6),
.logistics-package-summary-table td:nth-child(6),
.logistics-package-summary-table th:nth-child(7),
.logistics-package-summary-table td:nth-child(7),
.logistics-package-summary-table th:nth-child(8),
.logistics-package-summary-table td:nth-child(8) {
  width: 9%;
}

.logistics-package-summary-table th:nth-child(5),
.logistics-package-summary-table td:nth-child(5) {
  width: 13%;
}

.logistics-package-summary-table th:nth-child(9),
.logistics-package-summary-table td:nth-child(9) {
  width: 8%;
}

.quotation-preview {
  overflow-x: auto;
  margin: 10px 0 18px;
}

.quotation-sheet {
  min-width: 920px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(23, 32, 29, 0.06);
}

.quotation-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.quotation-title-row h2 {
  font-size: 30px;
  line-height: 1.05;
}

.quotation-title-row p {
  color: var(--muted);
  font-weight: 900;
  margin-top: 3px;
}

.quotation-logo {
  display: grid;
  place-items: center;
  width: 180px;
  height: 70px;
  border: 1px dashed #9eb4af;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
  background: #f7faf9;
  overflow: hidden;
  padding: 5px;
}

.quotation-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.quotation-logo:has(img) {
  border: 0;
  background: transparent;
  padding: 0;
  height: 88px;
  margin-top: 0;
  overflow: visible;
}

.quotation-logo:has(img) img {
  width: 84%;
  height: 84%;
  object-position: center center;
  transform: none;
}

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

.quotation-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fbfcfc;
}

.quotation-box h4 {
  margin: 0;
  padding: 9px 10px;
  background: #eef6f4;
  color: #10231f;
  font-size: 13px;
}

.quotation-field {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.quotation-field span {
  color: var(--muted);
  font-weight: 900;
}

.quotation-field strong {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.quotation-table-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 12px 0;
  background: #ffffff;
  break-inside: avoid;
  page-break-inside: avoid;
}

.quotation-table-section h4 {
  margin: 0;
  padding: 9px 10px;
  background: #eef6f4;
  color: #10231f;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.quotation-product-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 0;
}

.quotation-product-table .col-no {
  width: 48px;
}

.quotation-product-table .col-description {
  width: 28%;
}

.quotation-product-table .col-model {
  width: 28%;
}

.quotation-product-table .col-qty {
  width: 72px;
}

.quotation-product-table .col-unit {
  width: 74px;
}

.quotation-product-table .col-price {
  width: 118px;
}

.quotation-product-table .col-amount {
  width: 132px;
}

.quotation-product-table .col-remark {
  width: 96px;
}

.commercial-invoice-table .ci-col-no {
  width: 36px;
}

.commercial-invoice-table .ci-col-description {
  width: 32%;
}

.commercial-invoice-table .ci-col-model {
  width: 19%;
}

.commercial-invoice-table .ci-col-qty {
  width: 46px;
}

.commercial-invoice-table .ci-col-unit {
  width: 48px;
}

.commercial-invoice-table .ci-col-price {
  width: 118px;
}

.commercial-invoice-table .ci-col-amount {
  width: 126px;
}

.commercial-invoice-table .ci-col-remark {
  width: 88px;
}

.commercial-invoice-table th,
.commercial-invoice-table td {
  padding-top: 3px;
  padding-bottom: 3px;
}

.commercial-invoice-table tbody td {
  min-height: 0;
  height: auto;
  padding-top: 1px;
  padding-bottom: 1px;
  line-height: 1.00;
}

.pdf-mode .commercial-invoice-table tbody td {
  line-height: 1.00;
}

.commercial-invoice-table tbody td:nth-child(3) {
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
}

.commercial-invoice-table tbody td:nth-child(1),
.commercial-invoice-table tbody td:nth-child(3),
.commercial-invoice-table tbody td:nth-child(4),
.commercial-invoice-table tbody td:nth-child(5) {
  text-align: center;
  vertical-align: middle;
}

.commercial-invoice-table tbody td:nth-child(6),
.commercial-invoice-table tbody td:nth-child(7) {
  text-align: right;
  vertical-align: middle;
}

.quotation-product-table th,
.quotation-product-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-size: 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.quotation-product-table tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.quotation-product-table th {
  background: #eef6f4;
  color: #10231f;
  font-size: 12px;
  font-weight: 900;
  vertical-align: middle;
}

.quotation-product-table th span,
.quotation-product-table th em {
  display: block;
  font-style: normal;
}

.quotation-product-table th em {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.quotation-product-table tbody td {
  min-height: 44px;
}

.quotation-product-table .number-cell,
.quotation-product-table .money-cell {
  text-align: right;
  white-space: normal;
  overflow-wrap: normal;
}

.quotation-product-table .center-cell {
  text-align: center;
}

.quotation-product-table tbody td.center-cell {
  vertical-align: top;
}

.quotation-product-table .text-cell {
  overflow-wrap: break-word;
  white-space: pre-line;
}

.commercial-description {
  line-height: 0.9;
  white-space: normal;
}

.commercial-description span {
  display: block;
}

.commercial-description-cn {
  margin-top: 0;
}

.packing-list-table .pl-col-no {
  width: 34px;
}

.packing-list-table .pl-col-packing {
  width: 88px;
}

.packing-list-table .pl-col-goods {
  width: 38%;
}

.packing-list-table .pl-col-cartons {
  width: 68px;
}

.packing-list-table .pl-col-size {
  width: 112px;
}

.packing-list-table .pl-col-cbm,
.packing-list-table .pl-col-weight {
  width: 82px;
}

.packing-list-table .pl-col-remark {
  width: 72px;
}

.packing-list-table th,
.packing-list-table td {
  padding-top: 4px;
  padding-bottom: 4px;
  vertical-align: middle;
}

.packing-list-table tbody td:not(:nth-child(3)) {
  text-align: center;
  vertical-align: middle;
}

.packing-list-table tbody td:nth-child(3) {
  line-height: 1.12;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.quotation-product-table tfoot td {
  background: #fbfcfc;
  font-weight: 900;
  vertical-align: middle;
}

.quotation-product-table tfoot td:first-child {
  text-align: right;
  color: #10231f;
}

.quotation-product-table .quotation-grand-total td {
  background: #eef6f4;
  color: var(--primary);
  font-weight: 900;
}

.reset-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--bg);
}

.reset-card {
  width: min(620px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
  box-shadow: var(--shadow);
}

.reset-card h1 {
  margin: 8px 0 10px;
}

.reset-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.reset-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef6f4;
  padding: 14px;
  margin-top: 18px;
}

.reset-result p {
  margin: 4px 0 12px;
}

.quotation-remarks {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfc;
  margin-bottom: 12px;
}

.quotation-remarks strong {
  color: var(--primary);
  font-size: 13px;
}

.quotation-remarks p {
  font-size: 12px;
  line-height: 1.5;
  margin-top: 5px;
}

.rfq-item-head,
.rfq-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.rfq-item-head h4 {
  margin: 8px 0 0;
  font-size: 15px;
}

.match-score {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #e7f5ef;
  color: #126141;
  font-size: 18px;
}

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

.rfq-compare-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.gap-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.candidate-chip-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.candidate-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 3px 7px 3px 10px;
  border-radius: 999px;
  background: #e7f6f1;
  color: #0f765c;
  font-size: 12px;
  font-weight: 850;
}

.candidate-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 118, 92, 0.14);
  color: #0f765c;
  font-size: 12px;
  font-weight: 900;
  padding: 0;
}

.gap-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.gap-badge.ok {
  background: #e7f5ef;
  color: #126141;
}

.gap-badge.warn {
  background: #fff1df;
  color: #9a5511;
}

.rfq-gap-summary,
.gap-preview {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.rfq-comparison-table {
  display: grid;
  gap: 1px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  margin: 10px 0;
}

.rfq-comparison-row {
  display: grid;
  grid-template-columns: 120px minmax(190px, 1fr);
  grid-auto-columns: minmax(190px, 1fr);
  grid-auto-flow: column;
  min-width: max-content;
}

.rfq-comparison-row > div {
  background: #ffffff;
  padding: 9px 10px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.rfq-comparison-row > div:first-child {
  background: #f7faf9;
  color: var(--muted);
  font-weight: 900;
}

.rfq-comparison-row.header > div {
  background: #eef6f4;
  color: #10231f;
  font-weight: 900;
}

.rfq-editor-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.report-block {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.report-block:first-child {
  padding-top: 0;
}

.report-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.report-block strong {
  display: block;
  color: var(--primary);
  font-size: 13px;
  margin-bottom: 4px;
}

.report-block p {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.report-risk {
  color: var(--danger);
  font-weight: 900;
}

.contact-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfc;
}

.contact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.contact-top strong {
  overflow-wrap: anywhere;
}

.contact-lines {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 20, 18, 0.45);
}

.modal {
  width: min(1080px, 100%);
  max-height: min(900px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.owner-modal {
  width: min(760px, 100%);
}

#bulkUpdateSupplyModal {
  position: fixed;
  top: clamp(24px, 7vh, 64px);
  left: 50%;
  z-index: 35;
  width: min(720px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  transform: translateX(-50%);
}

.rfq-modal {
  width: min(1180px, 100%);
}

.overview-modal {
  width: min(1180px, 100%);
}

.product-overview-modal {
  width: min(1120px, 100%);
}

.overview-body {
  overflow: auto;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.overview-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #eef6f4, #ffffff);
}

.overview-hero h2 {
  margin: 10px 0 6px;
}

.overview-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.overview-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.overview-section h3 {
  margin: 0 0 12px;
}

.overview-grid {
  margin: 0;
}

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

.overview-contact-card {
  margin: 0;
  background: #fbfcfc;
}

.rfq-overview-modal {
  width: min(1280px, 100%);
}

.quote-overview-modal {
  width: min(1360px, 100%);
}

.quote-overview-preview {
  padding: 0;
  overflow: visible;
}

.quote-overview-preview h3 {
  padding: 16px 16px 0;
}

.quote-overview-preview .quotation-preview {
  display: block;
  margin: 0;
  padding: 14px 16px 18px;
  overflow-x: auto;
  overflow-y: visible;
}

.quote-overview-preview .quotation-sheet {
  min-width: 980px;
  box-shadow: none;
  height: auto;
}

.pi-so-sheet .quotation-title-row h2 {
  max-width: 520px;
}

.pi-so-signature-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  page-break-inside: avoid;
}

.pi-so-signature-section.seller-only {
  grid-template-columns: minmax(0, 1fr);
}

.pi-so-signature-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
}

.pi-so-signature-card h4 {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 14px;
}

.pi-so-signature-card h4 small {
  display: inline;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.signature-company {
  min-height: 34px;
  font-weight: 800;
  color: var(--muted);
}

.signature-space {
  flex: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 8px 0 12px;
}

.signature-date {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-weight: 700;
  color: var(--muted);
}

.export-workspace {
  grid-template-columns: 1fr;
}

.export-workspace .list-panel,
.export-detail-panel {
  width: 100%;
}

.export-workspace .table-wrap {
  max-height: 360px;
}

.export-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.export-tabs .tab-button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  padding: 10px 14px;
  cursor: pointer;
}

.export-tabs .tab-button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.export-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.export-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.link-button.archive-action.archived {
  color: var(--accent);
}

.link-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.65;
}

.archive-summary {
  grid-template-columns: repeat(3, minmax(160px, 240px));
}

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

.archive-toolbar {
  grid-template-columns: minmax(260px, 520px);
}

.archive-table {
  min-width: 1040px;
}

.archive-version,
.archive-file-count {
  display: inline-block;
  margin-top: 5px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.archive-detail-modal {
  width: min(900px, 100%);
}

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

.archive-meta-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.archive-meta-grid span,
.archive-document-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.archive-meta-grid strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.archive-document-list {
  display: grid;
  gap: 8px;
}

.archive-document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.archive-document-row span {
  margin-top: 4px;
}

.archive-document-row .button {
  flex: 0 0 auto;
}

.export-preview {
  overflow-x: auto;
}

.manual-document-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #d49a35;
  border-radius: 6px;
  background: #fff8e8;
  color: #7a4b00;
  font-size: 12px;
  font-weight: 900;
}

.manual-document-status.restored {
  border-color: var(--line);
  background: #f4f7f6;
  color: var(--muted);
}

.manual-document-editing {
  box-shadow: inset 0 0 0 3px rgba(212, 154, 53, 0.35);
}

.manual-document-field {
  min-width: 18px;
  min-height: 1.15em;
  outline: 1px dashed rgba(183, 107, 42, 0.72);
  outline-offset: -2px;
  background: #fff9df !important;
  cursor: text;
  white-space: pre-wrap;
}

.manual-document-field:focus {
  outline: 2px solid #b76b2a;
  outline-offset: -2px;
  background: #fff3c4 !important;
}

.manual-document-audit:empty {
  display: none;
}

.manual-document-history {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.manual-document-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.manual-document-history-header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manual-document-history-header h3 {
  margin: 0;
  font-size: 16px;
}

.manual-document-history-header > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manual-document-source-warning {
  margin-bottom: 10px;
  padding: 9px 11px;
  border-left: 3px solid #b76b2a;
  background: #fff8e8;
  color: #68420b;
  font-size: 12px;
  font-weight: 800;
}

.manual-document-history-list {
  display: grid;
  gap: 8px;
}

.manual-document-history-entry {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.manual-document-history-entry summary {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(190px, 1fr) minmax(180px, 2fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  list-style-position: inside;
}

.manual-document-history-entry summary span,
.manual-document-history-entry summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.manual-document-change-list {
  border-top: 1px solid var(--line);
}

.manual-document-change-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.manual-document-change-row:last-child {
  border-bottom: 0;
}

.manual-document-change-row .before,
.manual-document-change-row .after {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.manual-document-change-row .before {
  color: #9f2d20;
  text-decoration: line-through;
}

.manual-document-change-row .after {
  color: #176246;
  font-weight: 800;
}

.manual-document-change-row .change-arrow {
  color: var(--muted);
  text-align: center;
}

.manual-document-dialog-backdrop {
  align-items: flex-start;
  padding-top: 12vh;
}

.manual-document-dialog {
  width: min(560px, calc(100vw - 32px));
}

.manual-document-dialog-body {
  padding: 18px 22px;
}

.manual-document-dialog-body label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.manual-document-dialog-body input,
.manual-document-dialog-body textarea {
  width: 100%;
}

.manual-document-dialog-status {
  min-height: 20px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manual-document-dialog-status.error {
  color: #9f2d20;
}

.export-doc-sheet {
  width: 100%;
  min-width: 900px;
}

.export-placeholder {
  min-height: 420px;
  border: 1px dashed rgba(14, 47, 38, 0.22);
  border-radius: 8px;
  background: rgba(236, 245, 242, 0.65);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.export-placeholder h3 {
  margin: 8px 0 10px;
  font-size: 24px;
}

.export-placeholder p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.6;
}

.declaration-elements-doc {
  width: 100%;
  min-width: 760px;
  background: #fff;
  color: #111;
  border: 0;
  border-radius: 0;
  padding: 0 24px;
}

.declaration-page-title {
  text-align: center;
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
  color: #000;
}

.declaration-elements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 34px;
  align-items: start;
}

.declaration-element-card {
  break-inside: avoid;
  page-break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.declaration-product-head {
  display: inline-grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  color: #000;
}

.declaration-product-head span {
  font-variant-numeric: tabular-nums;
}

.declaration-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.declaration-tools .button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 11px;
}

.declaration-elements-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  color: #000;
}

.declaration-col-no {
  width: 26px;
}

.declaration-col-label {
  width: 50%;
}

.declaration-col-value {
  width: auto;
}

.declaration-col-action {
  width: 40px;
}

.declaration-elements-table td {
  border-bottom: 1px solid var(--line);
  padding: 4px 5px;
  vertical-align: middle;
  line-height: 1.06;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.declaration-elements-table tr:last-child td {
  border-bottom: 0;
}

.declaration-no {
  text-align: right;
  color: #222;
}

.declaration-label {
  border-right: 1px solid var(--line);
  font-weight: 800;
}

.declaration-editable {
  outline: 0;
  cursor: text;
}

.declaration-editable:focus {
  background: #fff9df;
  box-shadow: inset 0 0 0 1px rgba(183, 107, 42, 0.45);
}

.declaration-label em {
  color: #426c73;
  font-style: normal;
  font-size: 0.82em;
}

.declaration-value {
  font-weight: 900;
}

.declaration-locked-value {
  color: #000;
}

.declaration-card-locked .declaration-elements-table td {
  background: #fff;
}

.declaration-select {
  display: block;
  width: 100%;
  height: 1.1em;
  min-height: 1.1em;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image:
    linear-gradient(45deg, transparent 50%, #111 50%),
    linear-gradient(135deg, #111 50%, transparent 50%);
  background-position:
    calc(100% - 10px) 50%,
    calc(100% - 5px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  color: #111;
  font: inherit;
  font-weight: 900;
  line-height: 1.06;
  margin: 0;
  padding: 0 18px 0 0;
  appearance: none;
  -webkit-appearance: none;
}

.declaration-note {
  display: none;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.declaration-row-action {
  text-align: center;
}

.declaration-row-action .link-button {
  font-size: 11px;
}

.pdf-mode .declaration-elements-doc {
  min-width: 0;
  border: 0;
  padding: 0 10mm;
}

.pdf-mode .declaration-page-title {
  font-size: 21px;
  padding-top: 8mm;
  margin-bottom: 12mm;
}

.pdf-mode .declaration-elements-grid {
  gap: 8mm 10mm;
}

.pdf-mode .declaration-product-head {
  font-size: 13px;
  padding: 3px 6px;
}

.pdf-mode .declaration-tools,
.pdf-mode .declaration-row-action {
  display: none;
}

.pdf-mode .declaration-elements-table {
  font-size: 10px;
}

.pdf-mode .declaration-elements-table td {
  padding: 3px 4px;
}

.pdf-mode .declaration-select {
  border: 0;
  min-height: 0;
  padding: 0;
  appearance: none;
  background: transparent;
}

.pdf-mode .declaration-note {
  display: none;
}

.pdf-mode .declaration-col-action {
  width: 0;
}

.declaration-bulk-progress {
  align-items: flex-start;
  padding-top: 9vh;
}

.declaration-bulk-modal {
  max-width: 620px;
}

.declaration-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--ink);
}

.declaration-progress-meta strong {
  font-size: 18px;
}

.declaration-progress-meta span {
  color: var(--muted);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.declaration-progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(14, 47, 38, 0.1);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.declaration-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.2s ease;
}

.declaration-failure-review {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #f0c7bc;
  border-radius: 8px;
  background: #fff7f4;
  color: var(--ink);
}

.declaration-failure-review strong {
  display: block;
  margin-bottom: 4px;
  color: #9f2d20;
}

.declaration-failure-review p {
  margin: 0 0 8px;
  color: var(--muted);
}

.declaration-failure-review ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.declaration-failure-review li {
  line-height: 1.35;
}

.declaration-failure-review a {
  margin: 0 8px;
  color: var(--green);
  font-weight: 800;
}

.declaration-failure-review em {
  color: #8a4b3a;
  font-style: normal;
}

.declaration-pdf-confirm-backdrop {
  align-items: flex-start;
  padding-top: 3vh;
}

.declaration-pdf-preview-modal {
  width: min(1180px, calc(100vw - 48px));
  max-width: none;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
}

.declaration-pdf-preview-modal .modal-header {
  flex: 0 0 auto;
}

.pdf-confirm-preview-shell {
  flex: 1 1 auto;
  min-height: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #edf3f1;
  padding: 14px;
}

.pdf-confirm-preview-frame {
  width: 100%;
  height: min(72vh, 820px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.customs-declaration-sheet {
  --customs-line: 2px solid #111;
  width: 1120px;
  min-width: 1120px;
  background: #fff;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #111;
  font-family: "Aptos Narrow", "Arial Narrow", Arial, sans-serif;
}

.customs-declaration-sheet,
.customs-declaration-sheet * {
  color: #000 !important;
  font-weight: 700 !important;
}

.customs-header {
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
  text-align: center;
  margin-bottom: 4px;
}

.customs-header img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  transform: translateY(10px);
}

.customs-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 2px;
  font-weight: 700;
  transform: translateY(10px);
}

.customs-form-table,
.customs-commodity-table,
.customs-confirm-table,
.customs-footer-table {
  width: 100%;
  box-sizing: border-box;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 10px;
}

.customs-form-table {
  font-size: 10px;
}

.customs-form-table th,
.customs-form-table td,
.customs-commodity-table th,
.customs-commodity-table td,
.customs-confirm-table td,
.customs-footer-table th,
.customs-footer-table td {
  border: var(--customs-line);
  padding: 3px 4px;
  min-height: 22px;
  vertical-align: top;
  word-break: break-word;
}

.customs-form-table th,
.customs-commodity-table th,
.customs-footer-table th {
  background: #fff;
  font-weight: 700;
  text-align: left;
}

.customs-form-table tr:first-child td {
  border-top: 0;
  border-left: 0;
  border-right: 0;
}

.customs-form-table .customs-page-cell {
  padding-left: calc(3.5em + 100px);
}

.customs-form-table .customs-code-cell {
  padding-left: 40px;
}

.customs-form-table td span {
  font-weight: 700;
  font-size: 10px;
}

.customs-field {
  min-height: 25px;
}

.customs-field span {
  display: block;
  color: #667570;
  font-weight: 700;
  font-size: 10px;
  line-height: 1.15;
}

.customs-field strong {
  display: block;
  color: #111;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.12;
  white-space: pre-line;
}

.customs-domestic-seller-field > div {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.customs-domestic-seller-field > div strong {
  display: inline;
  color: #000 !important;
  white-space: nowrap;
}

.customs-domestic-seller-field > strong {
  color: #000 !important;
}

.customs-commodity-table {
  margin-top: 0;
  border-top: 0;
  margin-left: 0;
  width: 100%;
}

.customs-commodity-table thead tr:first-child th {
  border-top: 0;
}

.customs-commodity-table th,
.customs-commodity-table td {
  text-align: center;
}

.customs-commodity-table th {
  font-size: 10px;
  white-space: nowrap;
  line-height: 1.05;
  padding-left: 2px;
  padding-right: 2px;
}

.customs-commodity-table td {
  font-size: 10px;
  line-height: 1.12;
}

.customs-commodity-table tbody td {
  height: 28px;
}

.customs-commodity-table tbody tr.customs-empty-row td {
  height: 30px;
}

.customs-commodity-table th,
.customs-commodity-table td {
  border-left: 0;
  border-right: 0;
}

.customs-commodity-table th:first-child,
.customs-commodity-table td:first-child {
  border-left: var(--customs-line);
}

.customs-commodity-table th:last-child,
.customs-commodity-table td:last-child {
  border-right: var(--customs-line);
}

.customs-commodity-table th:nth-child(1),
.customs-commodity-table td:nth-child(1) {
  width: 5%;
}

.customs-commodity-table th:nth-child(2),
.customs-commodity-table td:nth-child(2) {
  width: 9%;
}

.customs-commodity-table th:nth-child(3),
.customs-commodity-table td:nth-child(3) {
  width: 34%;
  text-align: left;
}

.customs-commodity-table th:nth-child(4),
.customs-commodity-table td:nth-child(4) {
  width: 9%;
}

.customs-commodity-table th:nth-child(5),
.customs-commodity-table td:nth-child(5) {
  width: 10%;
}

.customs-commodity-table th:nth-child(6),
.customs-commodity-table td:nth-child(6),
.customs-commodity-table th:nth-child(7),
.customs-commodity-table td:nth-child(7) {
  width: 8%;
}

.customs-commodity-table th:nth-child(8),
.customs-commodity-table td:nth-child(8) {
  width: 9%;
}

.customs-commodity-table th:nth-child(9),
.customs-commodity-table td:nth-child(9) {
  width: 7%;
}

.customs-quantity-value,
.customs-net-weight-under-qty {
  display: block;
  white-space: nowrap;
}

.customs-net-weight-under-qty {
  margin-top: 2px;
  padding-left: 10px;
}

.customs-confirm-table {
  margin-top: 0;
  border-top: 0;
  margin-left: 0;
  width: 100%;
}

.customs-confirm-table tr:first-child td {
  border-top: 0;
}

.customs-confirm-table td {
  height: 18px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.customs-confirm-table td {
  border-left: var(--customs-line);
  border-right: var(--customs-line);
}

.customs-confirm-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 18px;
  align-items: center;
  min-height: 16px;
  font-size: 10px;
  line-height: 1;
}

.customs-confirm-pair {
  display: inline-flex;
  justify-content: center;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.customs-confirm-row .confirm-label {
  font-weight: 700;
}

.customs-footer-table {
  margin-top: 0;
  border: 0;
  border-top: 0;
  margin-left: 0;
  width: 100%;
  table-layout: fixed;
  font-size: 10px;
}

.customs-footer-table tr:first-child th,
.customs-footer-table tr:first-child td {
  border-top: 0;
}

.customs-footer-person,
.customs-footer-cert {
  width: 16%;
}

.customs-footer-phone {
  width: 8%;
}

.customs-footer-liability {
  width: 30%;
}

.customs-footer-seal {
  width: 30%;
}

.customs-footer-table th,
.customs-footer-table td {
  height: 18px;
  border-left: 0;
  border-right: 0;
  padding: 2px 4px;
  font-size: 10px;
  line-height: 1;
  text-align: left;
}

.customs-footer-table tr > :first-child {
  border-left: var(--customs-line);
}

.customs-footer-table tr > :last-child {
  border-right: var(--customs-line);
}

.customs-liability-cell {
  white-space: nowrap;
  vertical-align: top;
  font-size: 10px;
  text-align: right;
}

.customs-declare-stamp {
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  padding-left: 176px !important;
}

.customs-approval-seal {
  border-left: var(--customs-line) !important;
  white-space: nowrap;
}

.customs-approval-seal span {
  display: inline-block;
}

.customs-footer-table tr:last-child td:last-child {
  border-left: var(--customs-line) !important;
}

.customs-footer-table tr:first-child th,
.customs-footer-table tr:first-child td,
.customs-footer-table tr:nth-child(2) td {
  border-bottom: 0;
}

.customs-footer-table tr:nth-child(2) td,
.customs-footer-table tr:last-child th,
.customs-footer-table tr:last-child td {
  border-top: 0;
}

.customs-pdf-mode .pdf-shell {
  padding: 0;
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-header {
  justify-content: space-between;
}

.modal-kicker {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 900;
}

.form-sections {
  overflow: auto;
  padding: 18px 20px 22px;
}

.template-body {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.inline-template-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  margin: 12px 0;
}

.inline-template-body.one-card {
  grid-template-columns: minmax(0, 1fr);
}

.template-card {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--ink);
  text-decoration: none;
}

.template-card:hover {
  border-color: var(--primary);
  background: #f0f7f5;
}

.template-card-title {
  font-size: 15px;
  font-weight: 850;
}

.template-card-meta {
  color: var(--muted);
  font-size: 13px;
}

.form-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.form-section:first-child {
  padding-top: 0;
}

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

.form-section h3 {
  margin-bottom: 12px;
}

.section-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.field-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  margin: 3px 0 6px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.batch-match-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  margin: 14px 0;
  overflow: hidden;
}

.batch-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #eef6f4;
}

.batch-match-head strong {
  display: block;
  font-size: 15px;
}

.batch-match-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.batch-match-table {
  display: grid;
  gap: 1px;
  background: var(--line);
  overflow-x: auto;
}

.batch-match-row {
  display: grid;
  grid-template-columns: 70px minmax(220px, 1.1fr) minmax(260px, 1.4fr) 80px minmax(210px, 1fr);
  min-width: 980px;
  background: #ffffff;
}

.batch-match-row > div {
  padding: 10px 12px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.batch-match-row.header > div {
  background: #f3f8f6;
  color: var(--muted);
  font-weight: 900;
}

.batch-match-row span {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.batch-match-row select {
  width: 100%;
}

.batch-score {
  color: var(--primary);
  font-size: 18px;
}

.import-section {
  padding-top: 0;
}

.upload-box {
  display: grid;
  gap: 4px;
  min-height: 92px;
  align-content: center;
  border: 1px dashed #9eb4af;
  border-radius: 8px;
  background: #f7faf9;
  padding: 18px;
  cursor: pointer;
}

.upload-box:hover {
  border-color: var(--primary);
  background: #f0f7f5;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-title {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  margin: 0;
}

.upload-meta {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.upload-meta.success {
  color: var(--primary);
}

.upload-meta.error {
  color: var(--danger);
}

.import-report {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.import-report-group {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfc;
}

.import-report-title {
  font-size: 12px;
  font-weight: 900;
}

.import-report-title.fixed {
  color: var(--primary);
}

.import-report-title.warning {
  color: var(--danger);
}

.import-report ul {
  margin: 0;
  padding-left: 18px;
}

.import-report li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

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

.contacts-editor {
  display: grid;
  gap: 12px;
}

.contact-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfc;
}

.contact-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.primary-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.primary-check input {
  width: 16px;
  height: 16px;
}

.footer-spacer {
  flex: 1;
}

.manual-inquiry-progress {
  display: grid;
  gap: 2px;
  min-width: 128px;
}

.manual-inquiry-progress span {
  color: var(--muted);
  font-size: 11px;
}

.manual-inquiry-progress strong {
  color: var(--primary-dark);
  font-size: 13px;
}

.empty-state {
  padding: 44px 18px;
  color: var(--muted);
  text-align: center;
}

.workflow-main {
  display: grid;
  gap: 22px;
}

.workflow-hero {
  display: grid;
  gap: 16px;
}

.workflow-phase {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) 38px minmax(180px, 1fr);
  align-items: stretch;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.workflow-phase.matching-phase {
  grid-template-columns: 150px minmax(150px, 1fr) 34px minmax(150px, 1fr) 34px minmax(150px, 1fr) 34px minmax(150px, 1fr);
}

.workflow-phase.export-phase {
  grid-template-columns: 150px minmax(170px, 1fr) 34px minmax(170px, 1fr) 34px minmax(170px, 1fr);
}

.workflow-phase-label {
  display: grid;
  place-items: center;
  min-height: 82px;
  border-radius: 8px;
  background: #eef7f4;
  color: var(--green);
  font-weight: 900;
  text-align: center;
}

.workflow-node {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 82px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.workflow-node.prominent {
  border-color: rgba(23, 121, 103, 0.38);
  background: #edf8f5;
}

.workflow-node strong {
  color: var(--ink);
  font-size: 18px;
}

.workflow-node span {
  color: var(--muted);
  line-height: 1.45;
}

.workflow-arrow {
  position: relative;
  min-height: 82px;
}

.workflow-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 7px;
  height: 2px;
  background: #b8ccc6;
}

.workflow-arrow::after {
  content: "";
  position: absolute;
  top: calc(50% - 5px);
  right: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #7a9991;
}

.workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
}

.workflow-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
}

.workflow-wide {
  grid-column: 1 / -1;
}

.workflow-card h2 {
  margin-bottom: 14px;
}

.status-flow {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-flow li {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.status-flow span {
  color: var(--green);
  font-weight: 900;
}

.status-flow strong {
  color: var(--ink);
  font-weight: 700;
}

.source-map {
  display: grid;
  gap: 10px;
}

.source-map div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.source-map strong {
  color: var(--green);
}

.source-map span {
  color: var(--muted);
  line-height: 1.45;
}

.control-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-points span {
  padding: 10px 12px;
  border-radius: 999px;
  background: #eef7f4;
  color: #24564e;
  font-weight: 800;
}

.version-main {
  max-width: 1320px;
}

.version-current {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(420px, 1fr);
  gap: 28px;
  align-items: end;
  padding: 24px 0 28px;
  border-top: 3px solid var(--primary);
  border-bottom: 1px solid var(--line);
}

.version-eyebrow {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.version-current > div > strong {
  display: block;
  margin-top: 8px;
  font-size: 44px;
  line-height: 1;
}

.version-current > div > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
}

.version-current-meta {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.version-current-meta div {
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface);
}

.version-current-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.version-current-meta dd {
  margin: 6px 0 0;
  font-weight: 900;
}

.version-history-section {
  padding-top: 28px;
}

.system-update-section {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid #c9dcd7;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7fbfa 0%, #ffffff 64%);
  box-shadow: 0 12px 32px rgba(28, 71, 62, 0.06);
}

.system-update-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.system-update-heading h2 {
  margin-top: 5px;
  font-size: 24px;
}

.system-update-heading p {
  margin-top: 6px;
}

.update-security-badge,
.update-package-direction {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e4f2ee;
  color: #176c5c;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.update-security-badge::before {
  content: "✓";
  margin-right: 6px;
}

.system-update-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(440px, 1.1fr);
  gap: 18px;
}

.update-overview-card,
.update-upload-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.update-version-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.update-version-route div {
  display: grid;
  gap: 5px;
}

.update-version-route span {
  color: var(--muted);
  font-size: 12px;
}

.update-version-route strong {
  color: var(--primary-dark);
  font-size: 22px;
}

.update-route-arrow {
  color: #88a39c !important;
  font-size: 24px !important;
}

.update-safety-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.update-safety-list li {
  display: grid;
  gap: 3px;
  padding-left: 18px;
  position: relative;
}

.update-safety-list li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.update-safety-list strong {
  font-size: 13px;
}

.update-safety-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.update-upload-card {
  display: grid;
  gap: 14px;
}

.update-dropzone {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: 100%;
  min-height: 150px;
  padding: 22px;
  border: 2px dashed #9fbdb5;
  border-radius: 10px;
  background: #f6fbf9;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.update-dropzone:hover,
.update-dropzone.dragging {
  border-color: var(--primary);
  background: #edf8f4;
  transform: translateY(-1px);
}

.update-dropzone > span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.update-upload-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 24px;
  line-height: 1;
}

.update-package-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid #b8d8cf;
  border-radius: 8px;
  background: #f3faf7;
}

.update-package-summary > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.update-package-summary strong,
.update-package-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-package-summary small {
  color: var(--muted);
}

.update-package-direction.downgrade {
  width: max-content;
  background: #fff2df;
  color: #95520a;
}

.update-confirm-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.update-confirm-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.update-confirm-row input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.update-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.update-status.success { color: #14705b; }
.update-status.error { color: var(--danger); }

.version-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.version-rule {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 12px;
}

.version-rule strong {
  color: var(--ink);
}

.version-history {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 28px;
}

.version-history::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  background: var(--line);
}

.version-release {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.version-release-marker {
  position: absolute;
  top: 22px;
  left: -28px;
  width: 16px;
  height: 16px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  background: #8ba29c;
}

.version-release.current .version-release-marker {
  background: var(--primary);
}

.version-release-content {
  padding: 20px 22px;
}

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

.version-release-header h3 {
  margin-top: 10px;
  font-size: 18px;
}

.version-release-header time {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.version-release-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.version-number {
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
}

.version-type,
.version-current-label {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.version-current-label {
  background: #fff3e8;
  color: #8a4b17;
}

.version-change-list {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
  padding-left: 20px;
  color: #30413c;
  line-height: 1.5;
}

.version-change-list li::marker {
  color: var(--primary);
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 16px;
  }

  .module-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .nav-direct {
    min-height: 42px;
  }

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

  .rfq-workspace {
    grid-template-columns: 1fr;
  }

  .database-workspace {
    grid-template-columns: 1fr;
  }

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

  .workflow-phase,
  .workflow-phase.matching-phase,
  .workflow-grid,
  .version-current,
  .system-update-grid {
    grid-template-columns: 1fr;
  }

  .workflow-arrow {
    min-height: 26px;
  }

  .workflow-arrow::before {
    top: 0;
    bottom: 7px;
    left: 50%;
    right: auto;
    width: 2px;
    height: auto;
  }

  .workflow-arrow::after {
    top: auto;
    right: calc(50% - 6px);
    bottom: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #7a9991;
    border-bottom: 0;
  }

  .status-flow li {
    grid-template-columns: 1fr;
  }

  .version-section-heading,
  .version-release-header,
  .system-update-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .version-rule {
    justify-content: flex-start;
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .auth-page {
    padding: 12px;
  }

  .auth-shell,
  .account-grid,
  .account-summary {
    grid-template-columns: 1fr;
  }

  .auth-brand,
  .auth-panel {
    padding: 24px;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .modal-footer,
  .contact-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .modal-footer {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .summary-strip,
  .summary-strip.owner-summary,
  .toolbar,
  .toolbar.product-toolbar,
  .toolbar.owners-toolbar,
  .rfq-toolbar,
  .form-grid,
  .detail-grid,
  .module-nav,
  .version-current-meta {
    grid-template-columns: 1fr;
  }

  .version-current > div > strong {
    font-size: 36px;
  }

  .archive-meta-grid {
    grid-template-columns: 1fr;
  }

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

  .system-update-section {
    padding: 16px;
  }

  .update-safety-list,
  .update-confirm-row {
    grid-template-columns: 1fr;
  }

  .tabs {
    display: grid;
    width: 100%;
  }

  .spec-item {
    grid-template-columns: 1fr;
  }

  .rfq-workspace,
  .rfq-compare-grid {
    grid-template-columns: 1fr;
  }

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

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
  }

  .export-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-document-history-entry summary,
  .manual-document-change-row {
    grid-template-columns: 1fr;
  }

  .manual-document-change-row .change-arrow {
    transform: rotate(90deg);
  }
}

.global-export-panel { margin: 20px 0; padding: 24px; }
.global-export-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
.global-export-controls label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.global-export-controls input:not([type=checkbox]), .global-export-controls select { padding: 8px; border: 1px solid #cbd5e1; border-radius: 6px; max-width: 100%; }
.global-export-output { white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f7fa; padding: 14px; border-radius: 8px; max-height: 360px; overflow: auto; font-size: 13px; }
#geSources > div, #geConflicts > div { padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; margin-bottom: 8px; }
.global-export-panel input[type=checkbox] { width: 18px; height: 18px; display: inline-block; vertical-align: middle; margin: 0 8px 0 0; }
.global-export-panel > label { display: flex; align-items: center; }
#geStatus { padding: 12px 16px; background: #edf6f2; border: 1px solid #b9d9ca; border-radius: 8px; font-weight: 600; }
#geStatus.global-export-error { background: #fff1f0; border-color: #efb2ab; color: #9d2424; }
