* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow-x: hidden; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f0f2f5; color: #1a1a1a; font-size: 14px; }
:root {
  --dcats-navy: #1a1a2e;
  --dcats-brand-red: #d6001d;
  --dcats-brand-red-hover: #b80019;
  --dcats-brand-red-soft: #fff3f5;
  --dcats-brand-red-focus: rgba(214, 0, 29, 0.2);
  --dcats-ink: #081f3a;
  --dcats-border: #cbd5df;
  --dcats-surface: #f6f8fa;
  --dcats-focus: #2f6fed;
  --dcats-focus-ring: 0 0 0 2px rgba(47, 111, 237, 0.24);
  --dcats-customer-green: #154c3d;
  --dcats-customer-green-hover: #103d31;
  --dcats-control-height: 40px;
  --dcats-control-height-compact: 34px;
  --dcats-control-radius: 6px;
  --dcats-card-radius: 8px;
  --dcats-type-heading: 18px;
  --dcats-type-body: 14px;
  --dcats-type-supporting: 12px;
  --dcats-space-1: 4px;
  --dcats-space-2: 8px;
  --dcats-space-3: 12px;
  --dcats-space-4: 16px;
  --dcats-space-5: 24px;
  --dcats-space-6: 32px;
  --dcats-success-bg: #e6f4ea;
  --dcats-danger-bg: #fff0f0;
  --dcats-warning-bg: #fff6e5;
  --dcats-font-ui: "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --kind-rebuilt-bg: #edf7ed;
  --kind-rebuilt-fg: #1f7a35;
  --kind-rebuilt-border: #cbe9cf;
  --kind-aftermarket-bg: #e8f2ff;
  --kind-aftermarket-fg: #175cd3;
  --kind-aftermarket-border: #b8d3ff;
  --kind-catalog-bg: #f4f4f5;
  --kind-catalog-fg: #51525c;
  --kind-catalog-border: #d1d5db;
}

.screen { display: none; width: 100%; }
.screen.active { display: flex; flex-direction: column; min-height: 100vh; }
.dcats-ui-screen { font-family: var(--dcats-font-ui); }
.dcats-ui-screen button,
.dcats-ui-screen input,
.dcats-ui-screen select,
.dcats-ui-screen textarea { font-family: inherit; }
.app-boot { align-items: center; justify-content: center; background: #f0f2f5; }
.app-boot-content { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--dcats-navy); }
.app-boot-mark { display: block; width: 64px; height: 64px; object-fit: contain; }
.app-boot-content strong { font-size: 22px; letter-spacing: 0; }
.app-boot-spinner { width: 24px; height: 24px; border: 3px solid #d7deea; border-top-color: var(--dcats-brand-red); border-radius: 50%; animation: app-boot-spin .8s linear infinite; }
@keyframes app-boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .app-boot-spinner { animation: none; } }

.role-badge  { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.role-admin  { background: #fff0eb; color: #c04a1a; }
.role-system { background: #1a1a2e; color: #fff; }
.role-editor { background: #e8f4ff; color: #1a5faa; }
.role-price  { background: #f0fff4; color: #1a8c3e; }
.role-viewer { background: #f0f0f0; color: #666; }

/* =============================================
   言語切り替えボタン（ヘッダー内）
============================================= */
.lang-sw { display: flex; gap: 2px; background: rgba(255,255,255,0.1); border-radius: 6px; padding: 2px; flex-shrink: 0; }
.lang-btn { background: transparent; border: none; color: rgba(255,255,255,0.55); padding: 3px 8px; font-size: 11px; cursor: pointer; border-radius: 4px; transition: all .12s; white-space: nowrap; }
.lang-btn.active { background: rgba(255,255,255,0.22); color: #fff; font-weight: 700; }
.lang-btn:hover:not(.active) { color: #fff; }

/* 言語切り替えボタン（ログインカード内） */
.lang-sw-login { display: flex; justify-content: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.lang-btn-login { background: none; border: 1px solid #ddd; color: #999; padding: 3px 12px; font-size: 11px; cursor: pointer; border-radius: 12px; transition: all .12s; }
.lang-btn-login.active { background: var(--dcats-brand-red); border-color: var(--dcats-brand-red); color: #fff; font-weight: 700; }

/* =============================================
   共通ページヘッダー
============================================= */
.page-header { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--dcats-navy); color: #fff; flex-shrink: 0; gap: 10px; min-height: 48px; flex-wrap: wrap; box-shadow: 0 1px 0 rgba(0,0,0,0.08); }
.page-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--dcats-brand-red); pointer-events: none; }
.customer-portal-header::after,
#screen-search.customer-search-mode .page-header::after { display: none; }
.page-header-left  { display: flex; align-items: center; gap: 10px; }
.page-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.logo-text  { min-height: 24px; display: inline-flex; align-items: center; padding-left: 30px; background: url("assets/icons/dcats-mark-256.png") left center / 24px 24px no-repeat; font-size: 16px; font-weight: 800; letter-spacing: .06em; color: #fff; white-space: nowrap; }
.logo-sub   { font-size: 10px; color: #8899bb; white-space: nowrap; }
.back-btn   { background: rgba(255,255,255,0.12); border: none; border-radius: 6px; color: #fff; padding: 5px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.back-btn:hover { background: rgba(255,255,255,0.2); }
.header-username { font-size: 12px; color: #ccc; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout { background: rgba(255,255,255,0.12); border: none; border-radius: 6px; color: #fff; padding: 5px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.btn-logout:hover { background: rgba(255,255,255,0.2); }
.app-update-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--dcats-navy); color: #fff; box-shadow: 0 10px 32px rgba(0,0,0,0.25); font-size: 13px; }
.app-update-banner.show { display: flex; }
.app-update-banner strong { display: block; font-size: 14px; margin-bottom: 2px; }
.app-update-banner span { color: rgba(255,255,255,0.78); line-height: 1.5; }
.app-update-banner button { border: none; border-radius: 8px; background: var(--dcats-brand-red); color: #fff; font-weight: 700; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.app-update-banner button:hover { background: var(--dcats-brand-red-hover); }
.app-version-wrap { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.login-logo .app-version-wrap { justify-content: center; margin-top: 4px; }
.app-manual-refresh { border: 1px solid rgba(79,142,247,.35); border-radius: 999px; background: rgba(79,142,247,.12); color: #315f9f; font-size: 10px; font-weight: 700; line-height: 1; padding: 4px 8px; cursor: pointer; white-space: nowrap; }
.app-manual-refresh:hover { background: rgba(79,142,247,.2); border-color: rgba(79,142,247,.55); }
.page-header .app-manual-refresh { color: #d8e6ff; border-color: rgba(216,230,255,.28); background: rgba(255,255,255,.1); }
.page-header .app-manual-refresh:hover { background: rgba(255,255,255,.18); }
@media(max-width:640px){ .app-update-banner { left: 8px; right: 8px; bottom: 8px; align-items: flex-start; flex-direction: column; } .app-update-banner button { width: 100%; } }

/* =============================================
   登録申請画面
============================================= */
#screen-register { background: var(--dcats-navy); align-items: center; justify-content: center; }
.reg-card { background: #fff; border-radius: 18px; padding: 32px 32px 24px; width: calc(100% - 40px); max-width: 400px; margin: 20px auto; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.reg-card h2 { font-size: 20px; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.reg-desc { font-size: 12px; color: #aaa; margin-bottom: 18px; line-height: 1.5; }
.reg-divider { border: none; border-top: 1px solid #f0f0f0; margin: 0 0 16px; }
.reg-success-box { background: #e8f7ee; border: 1px solid #1a8c3e; border-radius: 10px; padding: 16px; text-align: center; color: #1a6fd4; font-size: 13px; line-height: 1.7; margin-top: 12px; }
.reg-error { color: #e24b4a; font-size: 12px; margin-top: 10px; text-align: center; min-height: 18px; }
.btn-back-login { background: none; border: none; color: #4f8ef7; font-size: 13px; cursor: pointer; text-decoration: underline; margin-top: 14px; display: block; text-align: center; width: 100%; }
.pass-strength-wrap { margin: -8px 0 12px; }
.price-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 13px; }
.price-table th { background: #f5f7fa; color: #555; font-weight: 600; padding: 7px 8px; text-align: left; border-bottom: 2px solid #e0e0e0; }
.price-table td { padding: 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.price-table tr:last-child td { border-bottom: none; }
.price-supplier { font-weight: 600; color: #1a1a2e; }
.price-country  { font-size: 11px; color: #aaa; margin-top: 2px; }
.price-value    { font-size: 15px; font-weight: 700; color: #1a6fd4; }
.price-moq      { font-size: 12px; color: #888; }
.price-section-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.sales-price-summary-block { margin-top: 10px; }
.detail-kind-price-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; align-items: stretch; margin-top: 10px; }
.detail-kind-price-row.single { grid-template-columns: minmax(0, 1fr); }
.detail-kind-price-row .product-kind-panel,
.detail-kind-price-row .sales-price-summary-block,
.detail-kind-price-row .ec-mall-summary-block { margin-top: 0; min-height: 116px; height: 100%; border: 1px solid #e5edf8; border-radius: 8px; background: #fbfdff; padding: 10px 12px; display: flex; flex-direction: column; }
.detail-kind-price-row .product-kind-panel { border-top: 1px solid #e5edf8; }
.detail-kind-price-row .product-kind-control { flex: 1; }
.detail-kind-price-row .sales-price-summary { border: 0; background: transparent; padding: 0; flex: 1; }
#screen-search .detail-inline-kind-panel { width: min(50%, 260px); min-width: 190px; margin-left: auto; }
.detail-inline-kind-panel { margin-top: 10px; border: 1px solid #e5edf8; border-radius: 8px; background: #fbfdff; padding: 9px 11px; }
.detail-inline-kind-panel .detail-block-title { margin-bottom: 6px; }
.detail-inline-kind-panel .product-kind-control { margin-top: 0; }
.detail-inline-kind-panel .product-kind-control-row.compact { justify-content: flex-end; }
.detail-inline-kind-panel .product-kind-select { min-width: 0; width: min(180px, 100%); }
.detail-inline-kind-panel .product-kind-stock-grid { max-width: 180px; margin-left: auto; }
.sales-price-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.sales-price-summary-head .detail-block-title { margin: 0; }
.sales-price-summary { border: 1px solid #e5edf8; border-radius: 8px; background: #fbfdff; padding: 10px 12px; margin-bottom: 0; font-size: 12px; }
.sales-price-summary-main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sales-price-summary-main.primary { justify-content: flex-end; }
.sales-price-summary-label { color: #667085; font-weight: 600; }
.sales-price-summary-value { color: #1a8c3e; font-size: 18px; font-weight: 800; }
.sales-price-summary-sub { color: #8a94a6; margin-top: 4px; line-height: 1.5; }
.ec-mall-detail-list { display: grid; gap: 7px; font-size: 12px; }
.ec-mall-detail-row { display: grid; grid-template-columns: 58px 1fr auto; gap: 8px; align-items: baseline; border-top: 1px solid #edf0f5; padding-top: 7px; }
.ec-mall-detail-row:first-child { border-top: 0; padding-top: 0; }
.ec-mall-detail-type { color: #667085; font-weight: 700; }
.ec-mall-detail-seller { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1a1a2e; }
.ec-mall-detail-price { color: #1a6fd4; font-weight: 800; white-space: nowrap; }
.ec-mall-detail-meta { color: #8a94a6; font-size: 11px; margin-top: 5px; line-height: 1.45; }
.ec-mall-detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ec-mall-detail-status { color: #8a94a6; font-size: 11px; line-height: 1.45; }
.ec-mall-detail-status.error { color: #e24b4a; }
.form-card.sales-pricing-card { display: flex; flex-direction: column; width: min(1120px, calc(100vw - 32px)); max-width: 1120px; max-height: calc(100dvh - 24px); margin: 12px; padding: 0; overflow: hidden; border-radius: 8px; }
.sales-pricing-body { min-height: 0; overflow-y: auto; padding: 20px 22px 14px; }
.sales-pricing-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px 24px; margin-bottom: 14px; }
.sales-pricing-heading h3 { grid-column: 1 / -1; margin-bottom: 0; }
.sales-pricing-context { grid-column: 1 / -1; min-width: 0; }
.g-part-number-context { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12px; color: #536176; }
.g-part-number-display { display: block; min-width: 0; padding: 7px 10px; border: 1px solid #d4dce8; border-radius: 6px; background: #f6f8fc; color: #17243b; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; user-select: text; }
.g-part-number-context .g-part-number-display { padding: 4px 10px; }
.sales-pricing-grid { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(230px, 1.25fr) minmax(180px, 1fr) minmax(170px, .9fr); gap: 12px; align-items: start; }
.sales-pricing-grid .form-row { margin-bottom: 0; }
.sales-pricing-note { grid-column: 1 / -1; }
.sales-pricing-help { min-width: 0; font-size: 12px; color: #667085; line-height: 1.45; margin: 0; }
.sales-pricing-references { margin: 0 0 14px; border: 1px solid #dfe5ec; background: #f7f9fc; }
.sales-pricing-references-title { padding: 7px 12px; border-bottom: 1px solid #dfe5ec; color: #344054; font-size: 11px; font-weight: 800; }
.sales-pricing-reference-grid { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(0, 2.2fr); }
.sales-pricing-reference-item { min-width: 0; min-height: 74px; padding: 10px 12px; border-left: 1px solid #dfe5ec; }
.sales-pricing-reference-item:first-child { border-left: 0; }
.sales-pricing-reference-label { display: block; color: #667085; font-size: 10px; font-weight: 700; line-height: 1.35; }
.sales-pricing-reference-value { display: block; margin-top: 3px; color: #1a1a2e; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; }
.sales-pricing-reference-meta { display: block; margin-top: 3px; color: #8a94a6; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.sales-pricing-reference-item.ec .sales-pricing-reference-value { color: #1a6fd4; }
.sales-pricing-reference-item.daiko .sales-pricing-reference-value { color: #825a00; }
.sales-pricing-reference-item.loading .sales-pricing-reference-value,
.sales-pricing-reference-item.empty .sales-pricing-reference-value { color: #8a94a6; font-size: 13px; }
.sales-pricing-manufacturing-cost { margin: 0; }
.sales-pricing-manufacturing-cost-cell .price-value { color: #1a1a2e; font-size: 13px; }
.sales-pricing-competitor-reference { min-width: 0; padding: 7px 10px 8px; border-left: 1px solid #dfe5ec; background: #fff; }
.sales-pricing-competitor-title { margin-bottom: 4px; color: #667085; font-size: 10px; font-weight: 800; line-height: 1.3; }
.sales-pricing-competitor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sales-pricing-competitor-grid .sales-pricing-reference-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 8px; min-height: 0; padding: 6px 8px; border: 1px solid #e6eaf0; background: #f9fafb; }
.sales-pricing-competitor-grid .sales-pricing-reference-value { margin-top: 0; font-size: 14px; }
.sales-pricing-competitor-grid .sales-pricing-reference-item.loading .sales-pricing-reference-value,
.sales-pricing-competitor-grid .sales-pricing-reference-item.empty .sales-pricing-reference-value { font-size: 11px; }
.sales-pricing-dkd-line { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.sales-pricing-category { color: #8a94a6; font-size: 11px; }
.sales-pricing-field-help { font-size: 11px; color: #8a94a6; line-height: 1.45; margin-top: 4px; }
.sales-pricing-core-charge.disabled { opacity: .55; }
.sales-pricing-preview { margin-top: 14px; border-top: 1px solid #dfe5ec; padding-top: 12px; }
.sales-rank1-override { margin-top: 14px; padding: 12px; border: 1px solid #bed4fa; border-radius: 8px; background: #f6f9ff; }
.sales-rank1-heading { font-weight: 700; color: #17365d; }
.sales-rank1-help { margin: 5px 0 10px; font-size: 12px; color: #50627b; }
.sales-rank1-controls { display: flex; gap: 8px; align-items: center; }
.sales-rank1-controls .form-input { max-width: 190px; }
.sales-rank1-status { min-height: 18px; margin-top: 6px; font-size: 12px; color: #50627b; }
.sales-rank1-status.error { color: #bd1d34; }
.sales-pricing-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sales-pricing-preview-title { font-size: 13px; font-weight: 700; color: #1a1a2e; }
.sales-pricing-preview-head .btn-sm-edit { flex: 0 0 auto; min-height: 34px; }
.sales-rank-table-wrap { width: 100%; overflow-x: auto; padding-bottom: 2px; }
.sales-rank-table { width: 100%; min-width: 930px; table-layout: fixed; margin-bottom: 0; }
.sales-rank-table th, .sales-rank-table td { white-space: normal; word-break: keep-all; padding: 8px 9px; }
.sales-rank-table th { line-height: 1.35; vertical-align: bottom; }
.sales-rank-table th:nth-child(1), .sales-rank-table td:nth-child(1) { width: 18%; }
.sales-rank-table th:nth-child(2), .sales-rank-table td:nth-child(2) { width: 14%; }
.sales-rank-table th:nth-child(3), .sales-rank-table td:nth-child(3) { width: 8%; text-align: center; }
.sales-rank-table th:nth-child(4), .sales-rank-table td:nth-child(4) { width: 14%; }
.sales-rank-table th:nth-child(5), .sales-rank-table td:nth-child(5) { width: 14%; }
.sales-rank-table th:nth-child(6), .sales-rank-table td:nth-child(6) { width: 13%; }
.sales-rank-table th:nth-child(7), .sales-rank-table td:nth-child(7) { width: 19%; }
.sales-rank-table .form-input { min-width: 0; min-height: 36px; padding: 7px 9px; font-variant-numeric: tabular-nums; }
.sales-rank-table input.form-input { text-align: right; }
.sales-rank-price { white-space: nowrap; }
.sales-pricing-error { color: #e24b4a; font-size: 12px; min-height: 18px; margin-top: 8px; }
.sales-pricing-footer { flex: 0 0 auto; margin-top: 0; padding: 12px 22px; background: #fff; }
.sales-pricing-footer button { min-width: 104px; }
@media(max-width:900px){
  .form-card.sales-pricing-card { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); margin: 8px; }
  .sales-pricing-body { padding: 16px 14px 10px; }
  .sales-pricing-reference-grid { grid-template-columns: minmax(180px, .75fr) minmax(0, 2fr); }
  .sales-pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-pricing-base-field { grid-row: span 2; }
  .sales-rank-table-wrap { overflow: visible; }
  .sales-rank-table { min-width: 0; font-size: 12px; }
  .sales-rank-table tbody { display: grid; gap: 8px; }
  .sales-rank-table tr:first-child { display: none; }
  .sales-rank-table tr:not(:first-child) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #dfe5ec; background: #fff; }
  .sales-rank-table td, .sales-rank-table td:nth-child(n) { display: grid; grid-template-columns: minmax(80px, .8fr) minmax(0, 1fr); align-items: center; gap: 8px; width: auto; min-width: 0; padding: 8px 10px; border-bottom: 1px solid #edf0f5; text-align: left; }
  .sales-rank-table td:nth-child(1) { grid-column: 1 / -1; grid-template-columns: 1fr; background: #f7f9fc; }
  .sales-rank-table td::before { content: attr(data-label); color: #667085; font-size: 10px; font-weight: 700; line-height: 1.3; }
  .sales-rank-table td:nth-child(1)::before { display: none; }
  .sales-rank-table .form-input { min-height: 34px; }
}
@media(min-width:901px){
  .sales-pricing-body { padding: 14px 20px 8px; }
  .sales-pricing-heading { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; margin-bottom: 10px; }
  .sales-pricing-card .sales-pricing-heading h3 { grid-column: auto; margin: 0; }
  .sales-pricing-context { grid-column: auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 16px; }
  .sales-pricing-context .g-part-number-context { margin-top: 0; flex-shrink: 0; }
  .sales-pricing-references { margin-bottom: 10px; }
  .sales-pricing-references-title { padding: 4px 10px; }
  .sales-pricing-reference-item { min-height: 54px; padding: 6px 10px; }
  .sales-pricing-competitor-reference { padding: 5px 8px; }
  .sales-pricing-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 12px; }
  .sales-pricing-grid > .form-row:nth-child(-n+2) { grid-column: span 2; }
  .sales-pricing-core-return, .sales-pricing-core-charge, .sales-pricing-note { grid-column: span 2; }
  .sales-pricing-grid .form-label { margin-bottom: 4px; }
  .sales-pricing-grid .form-input { min-height: 32px; padding: 6px 9px; }
  .sales-pricing-grid .core-return-choice span { min-height: 34px; padding: 6px 10px; }
  .sales-pricing-preview { margin-top: 10px; padding-top: 8px; }
  .sales-pricing-preview-head { margin-bottom: 6px; }
  .sales-pricing-preview-head .btn-sm-edit { min-height: 30px; }
  .sales-pricing-card .sales-rank-table { margin-bottom: 0; }
  .sales-pricing-card .sales-rank-table th, .sales-pricing-card .sales-rank-table td { padding: 4px 9px; }
  .sales-rank-table .form-input { min-height: 32px; padding: 5px 9px; }
  .sales-rank-table .price-country { display: none; }
  .sales-pricing-error:empty { display: none; }
  .sales-pricing-card .sales-pricing-footer { margin-top: 0; padding: 8px 20px; }
}
@media(max-width:560px){
  .sales-pricing-reference-grid { grid-template-columns: 1fr; }
  .sales-pricing-reference-item { min-height: 0; border-left: 0; border-top: 1px solid #dfe5ec; }
  .sales-pricing-reference-item:first-child { border-top: 0; }
  .sales-pricing-competitor-reference { border-top: 1px solid #dfe5ec; border-left: 0; }
  .sales-pricing-competitor-grid .sales-pricing-reference-item { border: 1px solid #e6eaf0; }
  .sales-pricing-competitor-grid { grid-template-columns: 1fr; }
  .sales-pricing-grid { grid-template-columns: 1fr; }
  .sales-pricing-base-field { grid-row: auto; }
  .sales-pricing-preview-head { align-items: stretch; flex-direction: column; }
  .sales-rank1-controls { flex-wrap: wrap; }
  .sales-pricing-preview-head .btn-sm-edit { width: 100%; }
  .sales-rank-table tr:not(:first-child) { grid-template-columns: 1fr; }
  .sales-rank-table td:nth-child(n) { grid-column: 1; }
  .sales-pricing-footer { display: grid; grid-template-columns: 1fr 1.4fr; padding: 10px 14px; }
  .sales-pricing-footer button { min-width: 0; }
}

/* Manufacturing ranking report */
#screen-manufacturing-ranking-report {
  background: #f4f7fb;
}

.ranking-report-body {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.ranking-report-card {
  background: #fff;
  border: 1px solid #e1e8f2;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(28, 47, 74, .06);
}

.ranking-report-source-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 22px;
  align-items: center;
  padding: 24px 26px;
  background:
    radial-gradient(circle at 100% 0, rgba(69, 125, 245, .1), transparent 38%),
    #fff;
}

.ranking-report-kicker {
  display: block;
  margin-bottom: 7px;
  color: #2f6fed;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

.ranking-report-source-copy h2,
.ranking-report-preview-head h3,
.ranking-report-section-head h3 {
  color: #16233a;
  margin: 0;
}

.ranking-report-source-copy h2 {
  font-size: 25px;
  letter-spacing: -.02em;
}

.ranking-report-source-copy > p {
  margin: 8px 0 0;
  color: #637087;
  font-size: 13px;
  line-height: 1.65;
}

.ranking-report-source-copy .ranking-report-local-note {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #ecf8f1;
  color: #28714a;
  font-size: 11px;
  font-weight: 700;
}

.ranking-report-file-drop {
  min-height: 126px;
  border: 1.5px dashed #9fb7df;
  border-radius: 14px;
  background: rgba(246, 249, 255, .9);
  color: #234a86;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px;
  text-align: center;
  transition: border-color .15s, background .15s, transform .15s;
}

.ranking-report-file-drop:hover,
.ranking-report-file-drop.is-dragging {
  border-color: #2f6fed;
  background: #edf4ff;
  transform: translateY(-1px);
}

.ranking-report-file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.ranking-report-file-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #2f6fed;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
}

.ranking-report-file-drop strong { font-size: 14px; }
.ranking-report-file-drop small { color: #7b8799; font-size: 11px; }

.ranking-report-dataset-panel {
  min-height: 126px;
  border: 1px solid #b8cae8;
  border-radius: 14px;
  background: rgba(246, 249, 255, .94);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 12px;
  padding: 18px;
}

.ranking-report-dataset-icon {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #2f6fed;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
}

.ranking-report-dataset-panel strong {
  display: block;
  color: #234a86;
  font-size: 14px;
}

.ranking-report-dataset-panel small {
  display: block;
  margin-top: 4px;
  color: #6f7e94;
  font-size: 11px;
  line-height: 1.45;
}

.ranking-report-dataset-panel button {
  grid-column: 1 / -1;
  border: 1px solid #a9bee1;
  border-radius: 9px;
  background: #fff;
  color: #285ba9;
  cursor: pointer;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.ranking-report-dataset-panel button:hover { background: #edf4ff; }
.ranking-report-dataset-panel button:disabled { cursor: wait; opacity: .6; }

.ranking-report-source-status {
  grid-column: 1 / -1;
  min-height: 40px;
  display: flex;
  align-items: center;
  border-radius: 10px;
  background: #f6f8fb;
  color: #68758a;
  padding: 10px 13px;
  font-size: 12px;
  line-height: 1.5;
}

.ranking-report-source-status.is-loading { background: #fff8e5; color: #8b6414; }
.ranking-report-source-status.is-success { background: #ecf8f1; color: #28714a; }
.ranking-report-source-status.is-error { background: #fff0f0; color: #a53838; }

.ranking-report-workspace {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}

.ranking-report-controls {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 20px;
}

.ranking-report-section-head {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ranking-report-section-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ranking-report-section-head h3 { font-size: 14px; }

.ranking-report-step {
  min-width: 28px;
  height: 23px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #eaf1ff;
  color: #2f6fed;
  font-size: 10px;
  font-weight: 900;
}

.ranking-report-inline-actions { display: flex; gap: 4px; }

.ranking-report-link-button {
  border: 0;
  background: transparent;
  color: #2f6fed;
  cursor: pointer;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 800;
}

.ranking-report-link-button:hover { text-decoration: underline; }

.ranking-report-category-list {
  max-height: 235px;
  overflow: auto;
  border: 1px solid #e4eaf3;
  border-radius: 12px;
  background: #fbfcfe;
  padding: 6px;
}

.ranking-report-category-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 9px;
}

.ranking-report-category-option:hover { background: #f0f5ff; }

.ranking-report-category-option input,
.ranking-report-check input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: #2f6fed;
  flex: 0 0 auto;
}

.ranking-report-category-option span { min-width: 0; }
.ranking-report-category-option strong { display: block; color: #2b374b; font-size: 12px; }
.ranking-report-category-option small { display: block; margin-top: 2px; color: #8993a4; font-size: 10px; line-height: 1.35; }

.ranking-report-placeholder {
  padding: 24px 10px;
  color: #9aa4b4;
  font-size: 12px;
  text-align: center;
}

.ranking-report-divider {
  height: 1px;
  margin: 20px 0;
  background: #edf0f5;
}

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

.ranking-report-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #5f6d83;
  font-size: 10px;
  font-weight: 800;
}

.ranking-report-field-wide { grid-column: 1 / -1; }
.ranking-report-product-category { margin-top: 14px; }
.ranking-report-product-category-picker summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid #d4ddeb;
  border-radius: 8px;
  background: #fff;
  color: #2b374b;
  font-size: 12px;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}
.ranking-report-product-category-picker summary::-webkit-details-marker { display: none; }
.ranking-report-product-category-picker summary::after { content: "▾"; flex-shrink: 0; }
.ranking-report-product-category-picker[open] summary::after { transform: rotate(180deg); }
.ranking-report-product-category-picker summary:focus-visible { outline: 2px solid #436ee8; outline-offset: 2px; }
.ranking-report-product-category-picker summary span { min-width: 0; overflow-wrap: anywhere; }
.ranking-report-product-category-actions { display: flex; justify-content: flex-end; padding-top: 8px; }
.ranking-report-product-category-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; max-height: 250px; overflow-y: auto; margin-top: 6px; }
.ranking-report-product-category-options .ranking-report-category-option { padding: 8px 6px; }
.ranking-report-category-option-wide { grid-column: 1 / -1; }
.ranking-report-product-category-options span { overflow-wrap: anywhere; }
.ranking-report-product-category-options input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; padding: 0; flex-shrink: 0; accent-color: #436ee8; }
.ranking-report-filter-help { margin: 8px 0 0; color: #68758a; font-size: 11px; line-height: 1.6; }
.ranking-report-vehicle-filters { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e2e8f0; }
.ranking-report-vehicle-size-option { border-bottom: 1px solid #e2e8f0; margin-bottom: 4px; }
.ranking-report-vehicle-detail { max-width: 260px; white-space: normal; line-height: 1.5; color: #58677d; }

.ranking-report-supplier-options {
  gap: 10px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background: #f7faff;
  padding: 10px;
}

.ranking-report-supplier-options[hidden],
.ranking-report-check[hidden] { display: none !important; }

.ranking-report-field input,
.ranking-report-field select {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  border: 1px solid #d7dfeb;
  border-radius: 9px;
  background: #fff;
  color: #24324a;
  outline: none;
  padding: 8px 9px;
  font-size: 12px;
}

.ranking-report-field input:focus,
.ranking-report-field select:focus {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .1);
}

.ranking-report-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 11px;
  color: #536176;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.45;
}

.ranking-report-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
  border-top: 1px solid #edf0f5;
  background: rgba(255, 255, 255, .97);
  padding-top: 13px;
  box-shadow: 0 -8px 16px rgba(255, 255, 255, .95);
}

#manufacturing-ranking-preview { grid-column: 1 / -1; }

.ranking-report-primary,
.ranking-report-excel,
.ranking-report-secondary {
  min-height: 42px;
  border-radius: 10px;
  cursor: pointer;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
}

.ranking-report-primary {
  border: 1px solid #245ece;
  background: #2f6fed;
  color: #fff;
  box-shadow: 0 7px 16px rgba(47, 111, 237, .22);
}

.ranking-report-excel {
  border: 1px solid #18864b;
  background: #209653;
  color: #fff;
  box-shadow: 0 7px 16px rgba(32, 150, 83, .2);
}

.ranking-report-secondary {
  border: 1px solid #d7dfeb;
  background: #fff;
  color: #45536a;
}

.ranking-report-primary:hover:not(:disabled) { background: #245ece; }
.ranking-report-excel:hover:not(:disabled) { background: #18864b; }
.ranking-report-secondary:hover:not(:disabled) { background: #f7f9fc; }
.ranking-report-primary:disabled,
.ranking-report-excel:disabled,
.ranking-report-secondary:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }

.ranking-report-preview {
  min-width: 0;
  min-height: 640px;
  border: 1px solid #e1e8f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(28, 47, 74, .06);
  overflow: hidden;
}

.ranking-report-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px 17px;
  border-bottom: 1px solid #edf0f5;
}

.ranking-report-preview-head h3 { font-size: 17px; }
.ranking-report-preview-note { color: #7b8799; font-size: 11px; }

.ranking-report-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 20px;
  background: #fbfcfe;
  border-bottom: 1px solid #edf0f5;
}

.ranking-report-summary-card {
  min-width: 0;
  border: 1px solid #e4eaf3;
  border-radius: 11px;
  background: #fff;
  padding: 11px 12px;
}

.ranking-report-summary-card span { display: block; color: #8590a2; font-size: 10px; }
.ranking-report-summary-card strong { display: block; margin-top: 5px; color: #1c2a42; font-size: 18px; }

.ranking-report-warning {
  margin: 14px 20px 0;
  border: 1px solid #f2d48b;
  border-radius: 10px;
  background: #fff8e5;
  color: #785b16;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.5;
}

.ranking-report-table-wrap {
  min-height: 450px;
  overflow: auto;
}

.ranking-report-table {
  width: 100%;
  min-width: 1420px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
}

.ranking-report-table.is-supplier-report { min-width: 1380px; }

.ranking-report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f8fc;
  color: #59667a;
  border-bottom: 1px solid #dfe6f0;
  padding: 10px 9px;
  font-size: 10px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.ranking-report-table td {
  color: #344158;
  border-bottom: 1px solid #edf0f5;
  padding: 10px 9px;
  vertical-align: top;
  line-height: 1.45;
}

.ranking-report-table tbody tr:hover td { background: #fbfdff; }
.ranking-report-table td strong { display: block; color: #1e2c43; font-size: 11px; }
.ranking-report-table td small { display: block; margin-top: 3px; color: #7f8a9c; font-size: 9px; }
.ranking-report-rank-cell { color: #245ece; font-size: 15px; font-weight: 900; text-align: right; }
.ranking-report-part-cell { font-family: Consolas, "SFMono-Regular", monospace; white-space: nowrap; }
.ranking-report-number-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ranking-report-score-cell { color: #245ece; font-weight: 900; }
.ranking-report-compat-column { min-width: 250px; }
.ranking-report-compat-cell { min-width: 250px; }
.ranking-report-stock-column { min-width: 210px; }
.ranking-report-stock-cell { min-width: 210px; }

.ranking-report-compat-badge {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid #f2c98d;
  background: #fff5e7;
  color: #9a4c00;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 900;
}

.ranking-report-compat-badge.is-info {
  border-color: #a8c5f4;
  background: #edf4ff;
  color: #245eaf;
}

.ranking-report-stock-badge {
  display: inline-flex;
  margin: 0 5px 5px 0;
  border: 1px solid #d6dee9;
  border-radius: 999px;
  background: #f5f7fa;
  color: #526174;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 900;
}

.ranking-report-stock-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.ranking-report-stock-row .ranking-report-stock-badge {
  box-sizing: border-box;
  flex: 0 0 100px;
  justify-content: center;
  margin: 0;
}

.ranking-report-stock-badge.is-positive {
  align-items: center;
  border-color: #42a96b;
  background: linear-gradient(135deg, #dff8e8, #effcf4);
  color: #126334;
  padding: 5px 9px;
  font-size: 10px;
  box-shadow: 0 2px 7px rgba(20, 116, 60, .15);
}

.ranking-report-stock-badge.is-positive::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #1f9d55;
  box-shadow: 0 0 0 3px rgba(31, 157, 85, .14);
}

.ranking-report-stock-badge.is-compatible {
  border-color: #7fc8b4;
  background: #e9f8f4;
  color: #0f6e5b;
}

.ranking-report-none { color: #9ca5b3; }

.ranking-report-supplier-status-column { width: 92px; }
.ranking-report-supplier-name-column,
.ranking-report-supplier-name-cell { min-width: 150px; }
.ranking-report-supplier-part-column,
.ranking-report-supplier-part-cell { min-width: 150px; }
.ranking-report-supplier-detail-column,
.ranking-report-supplier-detail-cell { min-width: 300px; }
.ranking-report-supplier-name-cell { color: #1e2c43; font-weight: 800; }
.ranking-report-supplier-part-cell {
  color: #1e2c43;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-weight: 900;
  white-space: nowrap;
}
.ranking-report-supplier-detail-cell { color: #66758b; }
.ranking-report-supplier-continuation td { border-top: 1px dashed #dce4ef; }

.ranking-report-supplier-status {
  display: inline-flex;
  min-width: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 900;
}

.ranking-report-supplier-status.is-available {
  border-color: #67bb83;
  background: #e5f7eb;
  color: #126334;
}

.ranking-report-supplier-status.is-unavailable {
  border-color: #e5a0a0;
  background: #fff0f0;
  color: #a32626;
}

.ranking-report-empty {
  min-height: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8b96a7;
  padding: 40px 20px;
  text-align: center;
}

.ranking-report-empty > span { color: #b2bfd2; font-size: 46px; }
.ranking-report-empty strong { margin-top: 10px; color: #4f5d72; font-size: 14px; }
.ranking-report-empty p { margin: 6px 0 0; font-size: 11px; }

@media (min-width: 861px) {
  #screen-manufacturing-ranking-report.active {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  #screen-manufacturing-ranking-report .ranking-report-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #screen-manufacturing-ranking-report .ranking-report-source-card { flex: 0 0 auto; }

  #screen-manufacturing-ranking-report .ranking-report-workspace {
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
  }

  #screen-manufacturing-ranking-report .ranking-report-controls {
    position: static;
    height: 100%;
    min-height: 0;
    max-height: none;
  }

  #screen-manufacturing-ranking-report .ranking-report-preview {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  #screen-manufacturing-ranking-report .ranking-report-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
  }
}

@media (max-width: 1120px) {
  .ranking-report-workspace { grid-template-columns: 320px minmax(0, 1fr); }
  .ranking-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .ranking-report-body { padding: 14px; }
  .ranking-report-source-card { grid-template-columns: 1fr; padding: 20px; }
  .ranking-report-source-status { grid-column: auto; }
  .ranking-report-workspace { grid-template-columns: 1fr; }
  .ranking-report-controls { position: static; max-height: none; overflow: visible; scrollbar-gutter: auto; }
  .ranking-report-actions { position: static; }
}

/* Core return terms */
.detail-sales-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin: 10px 0;
}
.detail-sales-terms-grid {
  display: block;
  min-width: 0;
  margin: 0;
}
.detail-sales-overview-grid > .ec-mall-summary-block {
  box-sizing: border-box;
  min-width: 0;
  min-height: 116px;
  border: 1px solid #e5edf8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
}
.detail-sales-terms-panel {
  width: min(100%, 280px);
  min-width: 0;
  border: 1px solid #e5edf8;
  border-radius: 6px;
  background: #fff;
  padding: 7px;
}
.detail-sales-term-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 34px;
  border-bottom: 1px solid #f0f0f0;
}
.detail-sales-terms-panel .detail-sales-term-label {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 7px 4px;
  color: #888;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}
.detail-sales-term-value {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 7px 4px;
  color: #1a1a2e;
  font-size: 13px;
  font-weight: 700;
}
.detail-sales-terms-panel .detail-sales-term-value.product-kind-control-row {
  justify-content: flex-start;
  gap: 0;
  flex-wrap: nowrap;
  padding: 0 4px;
}
.detail-sales-terms-panel .detail-sales-term-value .product-kind-select {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 4px 20px 4px 4px;
  background: #fff;
  font-size: 13px;
  text-align: left;
  text-align-last: left;
}
.detail-sales-terms-panel .product-kind-stock-grid { max-width: none; margin: 0; }
.detail-sales-terms-panel .product-kind-stock-row {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 0;
}
.detail-sales-terms-panel .product-kind-stock-grid .product-kind-stock-row .product-kind-stock-value {
  width: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 7px 4px;
  background: #fff;
  color: #1a1a2e;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.detail-sales-terms-panel #core-return-policy-wrap {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.core-return-policy-panel { min-width: 0; }
.core-return-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.core-return-policy-item {
  min-width: 0;
  padding: 7px 9px;
  border-left: 3px solid #9aa8b8;
  background: #f3f6f9;
}
.core-return-policy-item span {
  display: block;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
}
.core-return-policy-item strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #1f2937;
  font-size: 15px;
  letter-spacing: 0;
}
.core-return-policy-panel.vertical .core-return-policy-grid {
  grid-template-columns: 1fr;
  gap: 2px;
}
.core-return-policy-panel.vertical .core-return-policy-item {
  display: grid;
  grid-template-columns: minmax(72px, 92px) minmax(0, 1fr);
  align-items: center;
  min-height: 27px;
  padding: 3px 7px;
  border-left-width: 2px;
}
.core-return-policy-panel.vertical .core-return-policy-item strong {
  justify-self: start;
  margin-top: 0;
  font-size: 13px;
}
.core-return-policy-panel.vertical .core-return-badge {
  padding: 2px 6px;
  font-size: 11px !important;
}
.core-return-badge {
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 12px !important;
  line-height: 1.2;
}
.core-return-badge.required { background: #fff1ed; color: #b42318; }
.core-return-badge.not-required { background: #ecfdf3; color: #087443; }
.core-charge-value.unset { color: #9a6700 !important; }
.detail-sales-terms-panel .core-return-policy-panel.vertical .core-return-policy-grid { gap: 0; }
.detail-sales-terms-panel .core-return-policy-panel.vertical .core-return-policy-item {
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 34px;
  padding: 0;
  border-left: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.detail-sales-terms-panel .core-return-policy-panel.vertical .core-return-policy-item:last-child { border-bottom: 0; }
.detail-sales-terms-panel .core-return-policy-panel.vertical .core-return-policy-item span {
  padding: 7px 4px;
  color: #888;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}
.detail-sales-terms-panel .core-return-policy-panel.vertical .core-return-policy-item strong {
  margin: 0;
  padding: 7px 4px;
  font-size: 13px;
}
.detail-sales-terms-panel .core-return-policy-panel.vertical .core-return-policy-item strong.core-return-badge {
  margin-left: 4px;
  padding: 2px 6px;
  font-size: 13px !important;
}

.product-form-core-policy {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d9e2ec;
}
.product-form-core-policy-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(150px, 210px);
  gap: 10px;
  align-items: end;
}
.product-form-core-policy-head .form-label { margin-bottom: 9px; }
.product-form-core-policy-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.core-return-choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.core-return-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.core-return-choice label { position: relative; min-width: 0; cursor: pointer; }
.core-return-choice input { position: absolute; opacity: 0; pointer-events: none; }
.core-return-choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background: #fff;
  color: #526074;
  font-size: 13px;
  font-weight: 800;
}
.core-return-choice .required input:checked + span { border-color: #d92d20; background: #fff1ed; color: #b42318; }
.core-return-choice .not-required input:checked + span { border-color: #12a05c; background: #ecfdf3; color: #087443; }
.core-charge-input { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; }
.core-charge-input > span { color: #475467; font-weight: 800; text-align: center; }
.core-charge-input .form-input { min-width: 0; }
.product-form-core-policy-grid .form-row.disabled { opacity: .55; }
.product-form-shipping {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d9e2ec;
}
.product-form-shipping-grid {
  grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.3fr);
  gap: 12px;
  margin-top: 10px;
}
.product-form-shipping .spec-form-help { margin-top: 3px; }

.production-core-policy-list { grid-column: 1 / -1; margin-top: 6px; border-top: 1px solid #dde5ee; }
.production-core-policy-row {
  display: grid;
  grid-template-columns: minmax(100px, 150px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 5px 0;
  border-bottom: 1px solid #e6ebf1;
}
.production-core-policy-kind { padding-top: 5px; color: #334155; font-size: 12px; font-weight: 800; }
.production-core-policy-row.rebuilt .production-core-policy-kind { color: #236344; }
.production-core-policy-row.aftermarket_new .production-core-policy-kind { color: #315f84; }

.customer-catalog-availability-kind .core-return-policy-panel { border-top: 1px solid #dfe7e3; padding: 8px 10px 10px; }
.customer-catalog-availability-kind .core-return-policy-grid { gap: 6px; }
.customer-catalog-availability-kind .core-return-policy-item { padding: 6px 8px; }
.customer-catalog-availability-kind .core-return-policy-item strong { font-size: 13px; }

@media (max-width: 760px) {
  .detail-sales-overview-grid { grid-template-columns: 1fr; gap: 8px; }
  .product-form-core-policy-grid { grid-template-columns: 1fr; }
  .product-form-core-policy-head { grid-template-columns: 1fr; align-items: stretch; }
  .product-form-core-policy-head .form-label { margin-bottom: 0; }
  .product-form-shipping-grid { grid-template-columns: 1fr; }
  .production-core-policy-row { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 480px) {
  .core-return-policy-grid,
  .core-return-choice { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .ranking-report-body { padding: 9px; }
  .ranking-report-source-copy h2 { font-size: 21px; }
  .ranking-report-source-copy .ranking-report-local-note { border-radius: 10px; }
  .ranking-report-controls { padding: 16px; }
  .ranking-report-form-grid { grid-template-columns: 1fr; }
  .ranking-report-field-wide { grid-column: auto; }
  .ranking-report-actions { grid-template-columns: 1fr; }
  .ranking-report-preview-head { align-items: flex-start; flex-direction: column; }
  .ranking-report-summary { grid-template-columns: 1fr 1fr; padding: 12px; }
  .ranking-report-summary-card { padding: 9px; }
  .ranking-report-summary-card strong { font-size: 15px; }
}
.rakuten-quick-row { margin: 0; }
.rakuten-price-body { flex: 1; padding: 20px 16px; max-width: 1120px; width: 100%; margin: 0 auto; overflow-y: auto; }
.rakuten-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.rakuten-card h3 { font-size: 14px; font-weight: 700; color: #1a1a2e; margin-bottom: 10px; }
.ec-research-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ec-research-stat { border: 1px solid #edf0f5; border-radius: 8px; background: #fbfdff; padding: 10px 12px; }
.ec-research-stat-label { color: #667085; font-size: 11px; font-weight: 700; }
.ec-research-stat-value { color: #1a1a2e; font-size: 18px; font-weight: 800; margin-top: 4px; }
.ec-research-stat-sub { color: #8a94a6; font-size: 11px; margin-top: 4px; line-height: 1.45; }
.ec-schedule-panel { margin-top: 12px; border-top: 1px solid #edf0f5; padding-top: 12px; }
.ec-schedule-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; }
.ec-schedule-field label { display: block; color: #667085; font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.ec-schedule-field input, .ec-schedule-field select { width: 100%; border: 1px solid #d8deea; border-radius: 7px; padding: 7px 8px; font-size: 12px; background: #fff; outline: none; }
.ec-schedule-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; color: #1a1a2e; font-size: 12px; font-weight: 700; cursor: pointer; }
.ec-schedule-toggle input { width: 16px; height: 16px; }
@media(max-width:900px){ .ec-schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media(max-width:560px){ .ec-schedule-grid { grid-template-columns: 1fr; } }
.rakuten-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; align-items: end; }
.rakuten-field label { display: block; font-size: 12px; color: #888; margin-bottom: 4px; }
.rakuten-field input, .rakuten-field select { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none; background: #fff; }
.rakuten-field input:focus, .rakuten-field select:focus { border-color: #4f8ef7; }
.rakuten-field input[type="checkbox"] { width: 16px; min-width: 16px; height: 16px; margin: 0; padding: 0; border: 0; background: transparent; box-sizing: border-box; accent-color: #2f7df6; flex: 0 0 16px; }
.ec-provider-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ec-provider-chip { position: relative; display: inline-block; border: 1px solid #ddd; border-radius: 8px; padding: 0 10px 0 34px; font-size: 12px; color: #333; background: #fff; min-height: 36px; height: 36px; line-height: 34px; white-space: nowrap; box-sizing: border-box; vertical-align: middle; }
.ec-provider-chip input[type="checkbox"] { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); display: block; }
.ec-provider-chip span { display: inline-block; min-width: 0; line-height: 34px; vertical-align: top; }
.ec-seller-input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.ec-research-condition-grid { grid-template-columns: minmax(300px, max-content) minmax(320px, 1fr) minmax(120px, max-content); gap: 12px 56px; align-items: start; }
.ec-research-condition-grid .rakuten-field { min-width: 0; }
.ec-research-condition-grid .rakuten-field > label { min-height: 16px; line-height: 1.2; margin-bottom: 6px; }
.ec-research-condition-grid .ec-provider-row { min-height: 36px; align-items: center; }
.ec-research-condition-grid .ec-seller-input-row { grid-template-columns: minmax(280px, 1fr) auto; align-items: stretch; }
.ec-research-condition-grid .ec-seller-input-row input,
.ec-research-condition-grid .ec-seller-input-row button { height: 36px; box-sizing: border-box; }
@media(max-width:960px){ .ec-research-condition-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
@media(max-width:640px){ .ec-research-condition-grid { grid-template-columns: 1fr; } .ec-research-condition-grid .ec-seller-input-row { grid-template-columns: 1fr auto; } }
.ec-seller-picker { display: none; margin-top: 8px; border: 1px solid #e8e8e8; border-radius: 8px; background: #fff; max-height: 220px; overflow-y: auto; }
.ec-seller-picker.active { display: block; }
.ec-seller-picker-head { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; background: #f5f7fa; border-bottom: 1px solid #eee; font-size: 11px; font-weight: 700; color: #555; position: sticky; top: 0; z-index: 1; }
.ec-seller-option { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #f2f2f2; font-size: 12px; }
.ec-seller-option:last-child { border-bottom: 0; }
.ec-seller-option input { width: auto; margin: 0; }
.ec-seller-name { font-weight: 700; color: #1a1a2e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-seller-meta { color: #888; font-size: 11px; margin-top: 2px; }
.ec-seller-price { color: #1a8c3e; font-weight: 800; white-space: nowrap; }
.ec-best3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ec-best3-card { border: 1px solid #e8e8e8; border-radius: 8px; padding: 10px 12px; background: #fff; }
.ec-best3-title { font-size: 12px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.ec-best3-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; font-size: 12px; padding: 5px 0; border-top: 1px solid #f0f0f0; }
.ec-best3-row:first-of-type { border-top: 0; }
.ec-provider-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 7px; font-size: 10px; font-weight: 700; background: #eef4ff; color: #1a6fd4; white-space: nowrap; }
.ec-seller-review-state { display: block; margin-top: 3px; line-height: 1.35; }
.ec-seller-review-badge { display: inline-flex; align-items: center; border: 1px solid #e5b94d; border-radius: 999px; padding: 1px 6px; background: #fff4cc; color: #7a5100; font-size: 10px; font-weight: 800; white-space: nowrap; vertical-align: middle; }
.ec-seller-fixed-id { display: block; margin-top: 2px; color: #667085; font-family: Consolas, "Courier New", monospace; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.ec-seller-review-panel { margin: 0 0 12px; border: 1px solid #e8c978; background: #fffaf0; }
.ec-seller-review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; padding: 7px 12px; border-bottom: 1px solid #ecdcae; background: #fff5d9; box-sizing: border-box; }
.ec-seller-review-title { color: #5f4308; font-size: 13px; font-weight: 900; }
.ec-seller-review-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 999px; background: #875d08; color: #fff; font-size: 11px; font-weight: 900; box-sizing: border-box; }
.ec-seller-review-list { display: grid; }
.ec-seller-review-row { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(190px, auto) auto; gap: 16px; align-items: center; padding: 9px 12px; border-top: 1px solid #f0e4c2; }
.ec-seller-review-row:first-child { border-top: 0; }
.ec-seller-review-identity { min-width: 0; }
.ec-seller-review-name { color: #1f2937; font-size: 12px; font-weight: 900; }
.ec-seller-review-meta { display: flex; flex-direction: column; gap: 2px; color: #6b7280; font-size: 11px; white-space: nowrap; }
.ec-seller-review-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; white-space: nowrap; }
.ec-seller-review-actions a { color: #1667b1; font-size: 11px; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.ec-seller-review-actions a:hover { color: #0d4d88; }
.ec-history-btn { white-space: nowrap; }
.form-card.ec-price-history-card { max-width: 1800px; width: min(1800px, calc(100vw - 8px)); max-height: calc(100vh - 8px); overflow: auto; padding: 20px; margin: 4px; box-sizing: border-box; }
.ec-price-history-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.ec-price-history-head h3 { margin: 0 0 4px; }
.ec-price-history-close { border: none; border-radius: 999px; background: #e24b4a; color: #fff; width: 30px; height: 30px; font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer; flex: 0 0 auto; }
.ec-price-history-close:hover { background: #c93635; }
.ec-price-history-meta { color: #667085; font-size: 12px; line-height: 1.55; }
.ec-price-history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid #edf0f5; padding-top: 10px; margin-bottom: 10px; }
.ec-price-history-range { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ec-price-history-range button { border: 1px solid #d8deea; background: #fff; color: #344054; border-radius: 6px; padding: 5px 9px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.ec-price-history-range button.active { background: #1a6fd4; border-color: #1a6fd4; color: #fff; font-weight: 800; }
.ec-price-history-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.ec-price-history-stat { border: 1px solid #e5edf8; border-radius: 8px; background: #fbfdff; padding: 9px 10px; }
.ec-price-history-stat-label { color: #667085; font-size: 11px; font-weight: 800; }
.ec-price-history-stat-value { color: #1a1a2e; font-size: 18px; font-weight: 900; margin-top: 3px; }
.ec-price-history-stat-sub { color: #8a94a6; font-size: 11px; line-height: 1.45; margin-top: 2px; }
.ec-price-history-chart-wrap { border: 1px solid #dfe6f0; border-radius: 8px; background: #fff; padding: 12px; overflow: hidden; }
.ec-price-history-chart { width: 100%; height: clamp(460px, 68vh, 760px); display: block; }
.ec-price-history-axis { fill: #667085; font-size: 16px; font-weight: 800; }
.ec-price-history-grid { stroke: #e8edf4; stroke-width: 1; }
.ec-price-history-axis-line { stroke: #98a2b3; stroke-width: 1; }
.ec-price-history-line { fill: none; stroke-width: 2.8; stroke-linejoin: round; stroke-linecap: round; }
.ec-price-history-point { stroke: #fff; stroke-width: 1.8; }
.ec-price-history-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: #344054; font-size: 12px; font-weight: 700; }
.ec-price-history-legend-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ec-price-history-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ec-price-history-table { margin-top: 10px; max-height: 180px; overflow: auto; border: 1px solid #edf0f5; border-radius: 8px; }
.ec-price-history-table.seller-ranking { max-height: 260px; }
.ec-price-history-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ec-price-history-table th { position: sticky; top: 0; background: #f5f7fa; color: #555; font-weight: 800; padding: 7px 8px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.ec-price-history-table td { padding: 7px 8px; border-bottom: 1px solid #f0f2f6; vertical-align: top; }
.ec-price-history-table tr:last-child td { border-bottom: 0; }
.ec-price-history-table .rank-cell { width: 42px; text-align: right; color: #667085; font-weight: 800; white-space: nowrap; }
.ec-price-history-table .price-cell { white-space: nowrap; }
.ec-price-history-table.seller-ranking table { min-width: 980px; }
.ec-price-history-table.seller-ranking th,
.ec-price-history-table.seller-ranking td { white-space: nowrap; }
.ec-price-history-table.seller-ranking th:nth-child(2),
.ec-price-history-table.seller-ranking td:nth-child(2) { min-width: 220px; }
.ec-price-history-table.seller-ranking th:nth-child(4),
.ec-price-history-table.seller-ranking td:nth-child(4) { min-width: 84px; }
#rakuten-list { overflow-x: auto; }
#rakuten-list .ec-price-result-table { min-width: 1320px; table-layout: fixed; }
#rakuten-list .ec-price-result-table th:nth-child(1),
#rakuten-list .ec-price-result-table td:nth-child(1) { width: 150px; }
#rakuten-list .ec-price-result-table th:nth-child(2),
#rakuten-list .ec-price-result-table td:nth-child(2),
#rakuten-list .ec-price-result-table th:nth-child(3),
#rakuten-list .ec-price-result-table td:nth-child(3) { width: 165px; }
#rakuten-list .ec-price-result-table th:nth-child(-n+3),
#rakuten-list .ec-price-result-table td:nth-child(-n+3),
#rakuten-list .ec-price-result-table td:nth-child(-n+3) .mgmt-pn,
#rakuten-list .ec-price-result-table td:nth-child(-n+3) .mgmt-sub { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
#screen-rakuten-price-list .mgmt-body { max-width: min(1760px, calc(100vw - 16px)); padding-left: 8px; padding-right: 8px; }
#screen-rakuten-price-list .ec-price-list-filter-toolbar { align-items: stretch; }
#screen-rakuten-price-list .ec-price-list-filter-box {
  display: flex;
  flex: 1 1 360px;
  flex-direction: column;
  gap: 5px;
  min-width: 260px;
  padding: 9px 10px;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  background: #fbfdff;
}
#screen-rakuten-price-list .ec-price-list-filter-box label {
  color: #475467;
  font-size: 11px;
  font-weight: 800;
}
#screen-rakuten-price-list .ec-price-list-filter-box .mgmt-search {
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
#screen-rakuten-price-list .ec-price-list-filter-box:focus-within {
  border-color: #4f8ef7;
  box-shadow: 0 0 0 2px rgba(79,142,247,0.12);
}
#screen-rakuten-price-list .ec-price-list-seller-filter { flex: 0 0 auto; }
#rakuten-list.ec-mall-grouped-list { overflow-x: visible; }
#rakuten-list .ec-price-result-table.ec-mall-grouped-result-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 12px; }
#rakuten-list .ec-mall-grouped-result-table th,
#rakuten-list .ec-mall-grouped-result-table td { padding: 10px 10px; }
#rakuten-list .ec-mall-grouped-result-table th:nth-child(1),
#rakuten-list .ec-mall-grouped-result-table td:nth-child(1) { width: 14%; }
#rakuten-list .ec-mall-grouped-result-table th:nth-child(2),
#rakuten-list .ec-mall-grouped-result-table td:nth-child(2) { width: 12%; }
#rakuten-list .ec-mall-grouped-result-table th:nth-child(3),
#rakuten-list .ec-mall-grouped-result-table td:nth-child(3) { width: 13%; }
#rakuten-list .ec-mall-grouped-result-table th:nth-child(4),
#rakuten-list .ec-mall-grouped-result-table td:nth-child(4) { width: 8%; }
#rakuten-list .ec-mall-grouped-result-table th:nth-child(5),
#rakuten-list .ec-mall-grouped-result-table td:nth-child(5) { width: 21%; }
#rakuten-list .ec-mall-grouped-result-table th:nth-child(6),
#rakuten-list .ec-mall-grouped-result-table td:nth-child(6) { width: 12%; }
#rakuten-list .ec-mall-grouped-result-table th:nth-child(7),
#rakuten-list .ec-mall-grouped-result-table td:nth-child(7) { width: 11%; }
#rakuten-list .ec-mall-grouped-result-table th:nth-child(8),
#rakuten-list .ec-mall-grouped-result-table td:nth-child(8) { width: 9%; text-align: center; white-space: nowrap; }
#rakuten-list .ec-mall-grouped-result-table .ec-history-btn { width: 100%; padding-left: 4px; padding-right: 4px; }
@media(max-width:700px){ .form-card.ec-price-history-card { width: calc(100vw - 8px); max-height: calc(100vh - 8px); margin: 4px; padding: 12px 8px; } .ec-price-history-chart-wrap { padding: 6px; } .ec-price-history-chart { height: 380px; } .ec-price-history-axis { font-size: 14px; } #screen-rakuten-price-list .ec-price-list-filter-box { flex-basis: 100%; min-width: 0; } #screen-rakuten-price-list .ec-price-list-filter-toolbar .btn-primary, #screen-rakuten-price-list .ec-price-list-filter-toolbar .btn-sm-edit { width: 100%; } .ec-seller-review-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; } .ec-seller-review-meta { grid-column: 1; white-space: normal; } .ec-seller-review-actions { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; } }
.rakuten-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.rakuten-actions button:disabled { opacity: .45; cursor: not-allowed; }
.ec-research-operation-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ec-research-operation-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.ec-research-operation-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ec-research-run-now-button { min-height: 34px; padding: 7px 16px; }
.btn-sm-edit.ec-research-failures-button { min-height: 34px; padding: 7px 16px; border-color: #d92d20; background: #fff5f4; color: #b42318; font-weight: 800; }
.btn-sm-edit.ec-research-failures-button:hover { border-color: #b42318; background: #fee4e2; color: #912018; }
.btn-sm-edit.ec-research-results-button { min-height: 34px; padding: 7px 16px; border-color: #3f9b71; background: #eaf7f0; color: #176b49; font-weight: 700; }
.btn-sm-edit.ec-research-results-button:hover { border-color: #2f815c; background: #d9f0e4; color: #11583c; }
@media(max-width:640px){ .ec-research-operation-actions { grid-template-columns: 1fr; align-items: start; } .ec-research-operation-left .rakuten-note { flex-basis: 100%; } .ec-research-operation-right { justify-content: stretch; } .ec-research-operation-right button { flex: 1 1 0; } }
.form-card.ec-research-failure-card { width: min(1120px, calc(100vw - 24px)); max-width: 1120px; max-height: calc(100dvh - 24px); margin: 12px; padding: 0; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.ec-research-failure-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid #e4e7ec; }
.ec-research-failure-head h3 { margin: 0 0 5px; font-size: 18px; }
.ec-research-failure-meta { color: #667085; font-size: 12px; font-weight: 700; }
.ec-research-failure-close { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; color: #475467; font-size: 22px; line-height: 1; cursor: pointer; }
.ec-research-failure-close:hover { background: #f2f4f7; color: #1d2939; }
#ec-research-failure-body { min-height: 160px; padding: 16px 20px; overflow: auto; }
.ec-research-failure-run-error { display: grid; gap: 5px; margin-bottom: 12px; padding: 11px 12px; border-left: 4px solid #d92d20; background: #fff5f4; color: #7a271a; font-size: 12px; line-height: 1.55; }
.ec-research-failure-run-error > strong { font-size: 13px; }
.ec-research-failure-table-wrap { overflow: auto; border: 1px solid #e4e7ec; border-radius: 6px; }
.ec-research-failure-table { width: 100%; min-width: 900px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.ec-research-failure-table th { padding: 9px 10px; background: #f2f4f7; color: #475467; text-align: left; font-weight: 800; border-bottom: 1px solid #d0d5dd; }
.ec-research-failure-table td { padding: 11px 10px; color: #344054; vertical-align: top; border-bottom: 1px solid #eaecf0; overflow-wrap: anywhere; line-height: 1.5; }
.ec-research-failure-table tr:last-child td { border-bottom: 0; }
.ec-research-failure-table th:nth-child(1) { width: 18%; }
.ec-research-failure-table th:nth-child(2) { width: 20%; }
.ec-research-failure-table th:nth-child(3) { width: 15%; }
.ec-research-failure-table th:nth-child(4) { width: 32%; }
.ec-research-failure-table th:nth-child(5) { width: 15%; }
.ec-research-failure-target strong, .ec-research-failure-target span { display: block; }
.ec-research-failure-target strong { color: #101828; font-family: monospace; font-size: 13px; }
.ec-research-failure-target span { margin-top: 2px; color: #667085; font-size: 11px; }
.ec-research-failure-reason > strong { display: block; color: #b42318; }
.ec-research-failure-card details { margin-top: 5px; }
.ec-research-failure-card summary { width: fit-content; color: #475467; font-weight: 700; cursor: pointer; }
.ec-research-failure-card code { display: block; margin-top: 5px; padding: 7px 8px; border: 1px solid #eaecf0; border-radius: 4px; background: #f9fafb; color: #344054; white-space: pre-wrap; overflow-wrap: anywhere; }
.ec-research-failure-note { margin-top: 10px; padding: 9px 10px; border-left: 3px solid #f79009; background: #fffaeb; color: #7a2e0e; font-size: 12px; }
.ec-research-failure-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #e4e7ec; background: #f9fafb; }
@media(max-width:700px){ .form-card.ec-research-failure-card { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); margin: 6px; } .ec-research-failure-head { padding: 14px 14px 12px; } #ec-research-failure-body { padding: 12px 14px; } .ec-research-failure-table-wrap { border: 0; overflow: visible; } .ec-research-failure-table { display: block; min-width: 0; } .ec-research-failure-table thead { display: none; } .ec-research-failure-table tbody, .ec-research-failure-table tr, .ec-research-failure-table td { display: block; width: 100%; box-sizing: border-box; } .ec-research-failure-table tr { margin-bottom: 10px; border: 1px solid #e4e7ec; border-left: 4px solid #d92d20; border-radius: 6px; overflow: hidden; } .ec-research-failure-table td { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px; padding: 8px 10px; border-bottom: 1px solid #eaecf0; } .ec-research-failure-table td::before { content: attr(data-label); color: #667085; font-weight: 800; } .ec-research-failure-table td:last-child { border-bottom: 0; } .ec-research-failure-footer { padding: 10px 14px; } }
.rakuten-target-list { max-height: 220px; overflow: auto; border: 1px solid #eee; border-radius: 8px; margin-top: 10px; }
.rakuten-target-row { display: grid; grid-template-columns: 32px minmax(140px, 1.35fr) minmax(105px, 1fr) minmax(105px, 1fr) 90px 130px 95px 64px; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #f0f0f0; font-size: 12px; align-items: center; }
.rakuten-target-row:last-child { border-bottom: none; }
.rakuten-target-row.header { background: #f5f7fa; color: #555; font-weight: 700; position: sticky; top: 0; z-index: 1; }
.rakuten-target-check-cell input { width: 16px; height: 16px; margin: 0; }
.rakuten-target-num { font-family: monospace; color: #1a1a2e; word-break: break-all; }
.rakuten-target-muted { color: #aaa; font-size: 11px; }
.rakuten-target-delete { padding: 5px 8px; white-space: nowrap; }
.ec-category-target-card { max-width: 980px; }
.ec-category-target-summary { border: 1px solid #e7edf6; border-radius: 8px; background: #fbfdff; padding: 10px 12px; color: #455468; font-size: 12px; line-height: 1.6; margin-top: 6px; }
.ec-category-target-summary strong { color: #1a1a2e; font-weight: 800; }
.ec-category-target-summary .muted { color: #8a94a6; }
.ec-category-target-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.ec-category-target-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ec-category-target-actions-left, .ec-category-target-actions-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ec-category-target-results { margin-top: 8px; border: 1px solid #e8edf5; border-radius: 8px; max-height: 46vh; overflow: auto; background: #fff; }
.ec-category-target-row { display: grid; grid-template-columns: 34px minmax(160px, 1.1fr) minmax(130px, .9fr) minmax(120px, .8fr) minmax(120px, .8fr); gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #f0f2f6; font-size: 12px; }
.ec-category-target-row:last-child { border-bottom: 0; }
.ec-category-target-row.header { position: sticky; top: 0; z-index: 1; background: #f7f9fc; color: #566174; font-weight: 800; }
.ec-category-target-row input { width: auto; }
.ec-category-target-main { min-width: 0; }
.ec-category-target-pn { font-family: monospace; font-weight: 800; color: #1a1a2e; word-break: break-all; }
.ec-category-target-sub { color: #8a94a6; font-size: 11px; margin-top: 2px; line-height: 1.35; word-break: break-word; }
@media(max-width:780px){ .ec-category-target-filters { grid-template-columns: 1fr 1fr; } .ec-category-target-row { grid-template-columns: 30px minmax(150px, 1fr) minmax(120px, .8fr); } .ec-category-target-row > :nth-child(4), .ec-category-target-row > :nth-child(5) { display:none; } }
@media(max-width:560px){ .ec-category-target-filters { grid-template-columns: 1fr; } }
.rakuten-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.rakuten-stat { background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; padding: 10px 12px; }
.rakuten-stat-label { font-size: 11px; color: #888; margin-bottom: 4px; }
.rakuten-stat-value { font-size: 18px; font-weight: 800; color: #1a6fd4; }
.rakuten-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rakuten-item { background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; padding: 10px; display: grid; grid-template-columns: 72px 1fr; gap: 10px; min-width: 0; content-visibility: auto; contain-intrinsic-size: 94px; }
.rakuten-thumb { width: 72px; height: 72px; border-radius: 8px; background: #f0f0f0; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #ccc; }
.rakuten-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rakuten-item-name { font-size: 13px; font-weight: 600; color: #1a1a2e; line-height: 1.45; max-height: 38px; overflow: hidden; }
.rakuten-item-shop { font-size: 11px; color: #888; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rakuten-item-price { font-size: 18px; font-weight: 800; color: #1a8c3e; margin-top: 6px; }
.rakuten-item-meta { font-size: 11px; color: #aaa; margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.rakuten-item-link { display: inline-block; color: #4f8ef7; font-size: 12px; margin-top: 6px; text-decoration: none; font-weight: 600; }
.rakuten-result-more { grid-column: 1 / -1; padding-top: 2px; }
.rakuten-note { font-size: 12px; color: #888; line-height: 1.6; }
.rakuten-debug { background: #fff8e6; border: 1px solid #f0d38a; border-radius: 8px; padding: 10px 12px; color: #8a6200; font-size: 12px; line-height: 1.6; margin-bottom: 10px; }
.kikan-section-title { font-size: 14px; font-weight: 600; margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.kikan-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-bottom: 8px; font-size: 12px; }
.kikan-table th { background: #f5f7fa; color: #555; font-weight: 600; padding: 6px 8px; text-align: left; border-bottom: 2px solid #e0e0e0; }
.kikan-table td { padding: 7px 6px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; overflow: hidden; }
.kikan-table tr:last-child td { border-bottom: none; }
.kikan-table tr.kikan-current { background: #f0f6ff; }
.kikan-table tr.kikan-other { cursor: pointer; }
.kikan-table tr.kikan-other:hover { background: #f8f8f8; }
.kikan-table th:nth-child(1),
.kikan-table td:nth-child(1) { width: 112px; white-space: nowrap; }
.kikan-table th:nth-child(2),
.kikan-table td:nth-child(2) { padding-left: 3px; padding-right: 3px; }
.kikan-table th:nth-child(3),
.kikan-table td:nth-child(3) { width: 120px; min-width: 120px; padding-left: 3px; padding-right: 3px; }
.kikan-table th:nth-child(4),
.kikan-table td:nth-child(4) { width: 52px; min-width: 52px; padding-left: 3px; padding-right: 3px; }
.kikan-pn    { font-family: monospace; font-size: 12px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kikan-mfr   { font-size: 11px; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kikan-badge { background: #e8f4ff; color: #1a6fd4; border-radius: 4px; padding: 1px 6px; font-size: 10px; font-weight: 600; }
.kikan-stock-list { display: grid; gap: 3px; min-width: 74px; }
.kikan-stock-pill { display: grid; grid-template-columns: minmax(max-content, 1fr) 2em; align-items: center; gap: 2px; border: 1px solid transparent; border-radius: 5px; padding: 3px 2px; font-size: 10px; font-weight: 700; line-height: 1.2; }
.kikan-stock-pill span { min-width: max-content; white-space: nowrap; }
.kikan-stock-pill.rebuilt { background: var(--kind-rebuilt-bg); color: var(--kind-rebuilt-fg); border-color: var(--kind-rebuilt-border); }
.kikan-stock-pill.aftermarket_new { background: var(--kind-aftermarket-bg); color: var(--kind-aftermarket-fg); border-color: var(--kind-aftermarket-border); }
.kikan-stock-pill b { color: #1a1a2e; font-size: 11px; text-align: right; }
.kikan-action { text-align: center; white-space: nowrap; }
.btn-sm-edit.kikan-search-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 0; max-width: none; padding: 3px 2px; font-size: 11px; line-height: 1.1; }
.component-section-title { font-size: 14px; font-weight: 600; margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.component-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.component-search { flex: 1; min-width: 160px; border: 1px solid #ddd; border-radius: 6px; padding: 6px 8px; font-size: 12px; outline: none; }
.component-search:focus { border-color: #4f8ef7; }
.component-note { font-size: 11px; color: #888; line-height: 1.5; }
.form-card.component-reverse-card { width: min(1320px, calc(100vw - 16px)); max-width: calc(100vw - 16px); margin: 8px; padding: 20px; }
.component-reverse-help { color: #667085; font-size: 12px; line-height: 1.6; margin: 0 0 10px; }
.component-reverse-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; align-items: end; }
.component-reverse-field label { display: block; color: #667085; font-size: 11px; margin-bottom: 4px; }
.component-reverse-field input,
.component-reverse-field select { width: 100%; border: 1px solid #d7dce5; border-radius: 6px; padding: 8px 9px; font-size: 13px; outline: none; background: #fff; }
.component-reverse-field input:focus,
.component-reverse-field select:focus { border-color: #4f8ef7; }
.component-reverse-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 10px; }
.component-reverse-summary { color: #667085; font-size: 12px; min-height: 18px; margin-top: 8px; }
.component-reverse-result { max-height: 56vh; overflow-y: auto; overflow-x: hidden; margin-top: 10px; border: 1px solid #eef1f5; border-radius: 8px; }
.component-reverse-list { display: grid; gap: 0; }
.component-reverse-row { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(250px, 1.25fr) minmax(230px, .9fr) auto; gap: 12px; align-items: start; padding: 10px 12px; border-bottom: 1px solid #edf0f5; background: #fff; }
.component-reverse-row:nth-child(even) { background: #fbfcfe; }
.component-reverse-row:last-child { border-bottom: none; }
.component-reverse-label { color: #667085; font-size: 10px; font-weight: 800; margin-bottom: 3px; }
.component-reverse-main { color: #1a1a2e; font-size: 12px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.component-reverse-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.component-reverse-meta-item { min-width: 0; }
.component-reverse-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: auto; }
.component-reverse-table th { position: sticky; top: 0; z-index: 1; background: #f5f7fa; color: #555; font-weight: 700; padding: 7px 8px; text-align: left; border-bottom: 2px solid #e0e0e0; white-space: nowrap; }
.component-reverse-table td { padding: 8px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.component-reverse-table tr:last-child td { border-bottom: none; }
.component-reverse-assy { color: #1a4f9f; font-size: 13px; font-weight: 800; font-family: monospace; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.component-reverse-assy-genuine { color: #1a1a2e; margin-bottom: 3px; }
.component-reverse-sub { color: #9aa4b2; font-size: 11px; line-height: 1.35; margin-top: 2px; }
.component-reverse-part { font-weight: 800; color: #1a1a2e; overflow-wrap: anywhere; }
.component-reverse-nowrap { white-space: normal; overflow-wrap: anywhere; }
.component-compat-help { margin: 0 0 10px; padding: 8px 10px; border: 1px solid #dbe7f8; border-radius: 6px; background: #f7fbff; color: #334155; font-size: 11px; line-height: 1.6; }
.component-compat-help strong { color: #1a1a2e; font-weight: 700; }
.component-target-panel { margin: 0 0 12px; padding: 12px; border: 1px solid #dbe7f8; border-radius: 8px; background: #f7fbff; }
.component-target-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.component-target-title { font-size: 12px; font-weight: 800; color: #1a1a2e; }
.component-target-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.component-target-stat { min-width: 0; border: 1px solid #e5edf8; border-radius: 7px; background: #fff; padding: 7px 9px; }
.component-target-stat span { display: block; color: #667085; font-size: 10px; font-weight: 700; margin-bottom: 3px; }
.component-target-stat b { display: block; color: #1a1a2e; font-size: 13px; line-height: 1.35; word-break: break-all; }
.component-target-controls { display: grid; grid-template-columns: minmax(180px, 240px) minmax(220px, 1fr); gap: 10px; align-items: end; }
.component-target-field label { display: block; font-size: 11px; color: #667085; margin-bottom: 4px; }
.component-target-field select { width: 100%; border: 1px solid #cdd7e7; border-radius: 7px; padding: 7px 8px; font-size: 12px; outline: none; background: #fff; }
.component-target-help { margin-top: 8px; color: #667085; font-size: 11px; line-height: 1.5; }
.component-empty-state { border: 1px dashed #d7e3f5; border-radius: 8px; background: #fbfdff; padding: 12px; color: #667085; font-size: 12px; line-height: 1.6; }
.component-empty-title { color: #1a1a2e; font-weight: 800; margin-bottom: 3px; }
.component-catalog-head-layout { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 12px; align-items: stretch; margin: 0 0 12px; }
.component-catalog-target { min-width: 0; }
.component-catalog-target .component-target-panel { height: 100%; margin: 0; }
.component-catalog-target .component-target-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.component-catalog-target .component-target-controls { grid-template-columns: 1fr; }
.component-illustration-slot { min-width: 0; }
.catalog-illustration-panel { height: 100%; margin: 0; padding: 10px; border: 1px solid #dbe7f8; border-radius: 8px; background: #fbfdff; }
.catalog-illustration-error { color: #b42318; background: #fff7f7; border-color: #f2b5b5; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.catalog-illustration-empty { color: #667085; }
.catalog-illustration-empty .component-empty { color: #475467; }
.catalog-illustration-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.catalog-illustration-title { color: #1a1a2e; font-size: 13px; font-weight: 800; }
.catalog-illustration-meta { color: #667085; font-size: 11px; font-weight: 700; }
.catalog-illustration-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.catalog-illustration-card { min-width: 0; border: 1px solid #e5edf8; border-radius: 8px; background: #fff; padding: 8px; }
.catalog-illustration-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.catalog-illustration-card-label { min-width: 0; }
.catalog-illustration-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.catalog-illustration-tool { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #cdd7e7; border-radius: 6px; background: #fff; color: #334155; font-size: 17px; font-weight: 700; line-height: 1; cursor: pointer; }
.catalog-illustration-tool:hover { border-color: #4f8ef7; color: #1d4ed8; background: #f7fbff; }
.catalog-illustration-tool:focus-visible { outline: 2px solid #4f8ef7; outline-offset: 1px; }
.catalog-illustration-zoom { width: 48px; color: #475467; font-size: 11px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.catalog-illustration-frame { position: relative; width: 100%; height: clamp(240px, 30vw, 390px); overflow: hidden; border: 1px solid #dfe6ef; border-radius: 6px; background: #fff; cursor: grab; touch-action: none; user-select: none; }
.catalog-illustration-frame:focus-visible { outline: 2px solid #4f8ef7; outline-offset: 1px; }
.catalog-illustration-frame.is-dragging { cursor: grabbing; }
.catalog-illustration-canvas { display: block; width: 100%; height: 100%; background: #fff; }
.catalog-illustration-canvas image { pointer-events: none; }
.catalog-illustration-image-denso { filter: brightness(1.4) contrast(2.4); }
.catalog-illustration-point { pointer-events: none; }
.catalog-illustration-point circle { fill: rgba(37, 99, 235, 0.9); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.catalog-illustration-point text { fill: #fff; font-weight: 800; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(30, 64, 175, 0.55); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.component-add-panel { margin: 0 0 12px; padding: 12px; border: 1px solid #e5e9f2; border-radius: 8px; background: #fff; }
.component-add-compact { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; }
.component-add-title { font-size: 13px; font-weight: 700; color: #1a1a2e; margin-bottom: 10px; }
.component-add-compact .component-add-title { margin-bottom: 0; }
.component-add-current { color: #667085; font-size: 11px; margin-top: 2px; }
.component-add-card { max-width: 920px; }
.component-add-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.component-add-field label { display: block; font-size: 11px; color: #667085; margin-bottom: 4px; }
.component-add-field input,
.component-add-field select,
.component-add-field textarea { width: 100%; border: 1px solid #d7dce5; border-radius: 6px; padding: 7px 8px; font-size: 12px; outline: none; background: #fff; }
.component-add-field textarea { min-height: 34px; resize: vertical; }
.component-add-field.wide { grid-column: span 2; }
.component-add-field.full { grid-column: 1 / -1; }
.component-add-field.full textarea { min-height: 66px; }
.component-yen-input { position: relative; }
.component-yen-input .component-yen-prefix { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: #667085; font-size: 12px; font-weight: 700; pointer-events: none; }
.component-yen-input input { padding-left: 23px; }
.component-add-field input:focus,
.component-add-field select:focus,
.component-add-field textarea:focus { border-color: #4f8ef7; }
.component-part-number-warning { border-color: #f4b740 !important; background: #fffaf0 !important; }
.component-part-number-invalid { border-color: #e24b4a !important; background: #fff7f7 !important; }
.component-input-warning { display: none; margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #fffaf0; border: 1px solid #f4d58a; color: #8a5a00; font-size: 12px; line-height: 1.5; white-space: pre-line; }
.component-input-warning.show { display: block; }
.component-input-warning.error { background: #fff7f7; border-color: #f2b5b5; color: #b42318; }
.component-add-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
@media(max-width:1100px){ .component-reverse-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .component-reverse-row .component-reverse-action { justify-self: start; } }
@media(max-width:900px){ .component-add-grid, .component-reverse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .component-target-summary, .component-catalog-target .component-target-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } .component-catalog-head-layout { grid-template-columns: 1fr; } .component-catalog-target .component-target-controls { grid-template-columns: minmax(180px, 240px) minmax(220px, 1fr); } }
@media(max-width:560px){ .component-add-grid, .component-target-controls, .component-target-summary, .component-reverse-grid, .component-reverse-row, .component-catalog-target .component-target-controls, .component-catalog-target .component-target-summary { grid-template-columns: 1fr; } .component-add-field.wide, .component-add-field.full { grid-column: 1; } .component-target-head, .catalog-illustration-card-head { align-items: flex-start; flex-direction: column; } .catalog-illustration-frame { height: 260px; } .catalog-illustration-actions { align-self: flex-end; } .component-reverse-result { max-height: 58vh; } }
#component-wrap { overflow-x: auto; }
.component-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-bottom: 8px; font-size: 11px; }
.component-table th { background: #f5f7fa; color: #555; font-weight: 600; padding: 5px 5px; text-align: left; border-bottom: 2px solid #e0e0e0; }
.component-table td { padding: 6px 5px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.component-table tr:last-child td { border-bottom: none; }
.component-table input { width: 100%; min-width: 0; border: 1px solid #d7dce5; border-radius: 5px; padding: 4px 5px; font-size: 11px; }
.component-table select { width: 100%; min-width: 0; border: 1px solid #d7dce5; border-radius: 5px; padding: 4px 5px; font-size: 11px; background: #fff; }
.component-table input[data-component-edit-field="component_manufacturer_part_number"],
.component-table input[data-component-edit-field="component_genuine_part_number"],
.component-table input[data-component-edit-field="component_manufacturer"] { font-family: monospace; }
.component-table-basic th:nth-child(1), .component-table-basic td:nth-child(1) { width: 15%; }
.component-table-basic th:nth-child(2), .component-table-basic td:nth-child(2) { width: 13%; }
.component-table-basic th:nth-child(3), .component-table-basic td:nth-child(3) { width: 19%; }
.component-table-basic th:nth-child(4), .component-table-basic td:nth-child(4) { width: 5%; }
.component-table-basic th:nth-child(5), .component-table-basic td:nth-child(5) { width: 7%; }
.component-table-basic th:nth-child(6), .component-table-basic td:nth-child(6) { width: 5%; }
.component-table-basic th:nth-child(7), .component-table-basic td:nth-child(7) { width: 9%; }
.component-table-basic th:nth-child(8), .component-table-basic td:nth-child(8) { width: 6%; }
.component-table-basic th:nth-child(9), .component-table-basic td:nth-child(9) { width: 10%; }
.component-table-tree th:nth-child(1), .component-table-tree td:nth-child(1) { width: 4%; }
.component-table-tree th:nth-child(2), .component-table-tree td:nth-child(2) { width: 14%; }
.component-table-tree th:nth-child(3), .component-table-tree td:nth-child(3) { width: 12%; }
.component-table-tree th:nth-child(4), .component-table-tree td:nth-child(4) { width: 18%; }
.component-table-tree th:nth-child(5), .component-table-tree td:nth-child(5) { width: 5%; }
.component-table-tree th:nth-child(6), .component-table-tree td:nth-child(6) { width: 7%; }
.component-table-tree th:nth-child(7), .component-table-tree td:nth-child(7) { width: 4%; }
.component-table-tree th:nth-child(8), .component-table-tree td:nth-child(8) { width: 8%; }
.component-table-tree th:nth-child(9), .component-table-tree td:nth-child(9) { width: 6%; }
.component-table-tree th:nth-child(10), .component-table-tree td:nth-child(10) { width: 7%; }
.component-table-tree th:nth-child(11), .component-table-tree td:nth-child(11) { width: 4%; }
.component-table-basic.component-table-manual th:nth-child(1), .component-table-basic.component-table-manual td:nth-child(1) { width: 14%; }
.component-table-basic.component-table-manual th:nth-child(2), .component-table-basic.component-table-manual td:nth-child(2) { width: 12%; }
.component-table-basic.component-table-manual th:nth-child(3), .component-table-basic.component-table-manual td:nth-child(3) { width: 17%; }
.component-table-basic.component-table-manual th:nth-child(4), .component-table-basic.component-table-manual td:nth-child(4) { width: 5%; }
.component-table-basic.component-table-manual th:nth-child(5), .component-table-basic.component-table-manual td:nth-child(5) { width: 7%; }
.component-table-basic.component-table-manual th:nth-child(6), .component-table-basic.component-table-manual td:nth-child(6) { width: 5%; }
.component-table-basic.component-table-manual th:nth-child(7), .component-table-basic.component-table-manual td:nth-child(7) { width: 8%; }
.component-table-basic.component-table-manual th:nth-child(8), .component-table-basic.component-table-manual td:nth-child(8) { width: 6%; }
.component-table-basic.component-table-manual th:nth-child(9), .component-table-basic.component-table-manual td:nth-child(9) { width: 15%; }
.component-table-tree.component-table-manual th:nth-child(1), .component-table-tree.component-table-manual td:nth-child(1) { width: 4%; }
.component-table-tree.component-table-manual th:nth-child(2), .component-table-tree.component-table-manual td:nth-child(2) { width: 13%; }
.component-table-tree.component-table-manual th:nth-child(3), .component-table-tree.component-table-manual td:nth-child(3) { width: 11%; }
.component-table-tree.component-table-manual th:nth-child(4), .component-table-tree.component-table-manual td:nth-child(4) { width: 16%; }
.component-table-tree.component-table-manual th:nth-child(5), .component-table-tree.component-table-manual td:nth-child(5) { width: 5%; }
.component-table-tree.component-table-manual th:nth-child(6), .component-table-tree.component-table-manual td:nth-child(6) { width: 7%; }
.component-table-tree.component-table-manual th:nth-child(7), .component-table-tree.component-table-manual td:nth-child(7) { width: 4%; }
.component-table-tree.component-table-manual th:nth-child(8), .component-table-tree.component-table-manual td:nth-child(8) { width: 7%; }
.component-table-tree.component-table-manual th:nth-child(9), .component-table-tree.component-table-manual td:nth-child(9) { width: 6%; }
.component-table-tree.component-table-manual th:nth-child(10), .component-table-tree.component-table-manual td:nth-child(10) { width: 13%; }
.component-table-tree.component-table-manual th:nth-child(11), .component-table-tree.component-table-manual td:nth-child(11) { width: 4%; }
.component-table .component-action-col { width: 132px; position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -1px 0 0 #edf0f5; }
.component-table th.component-action-col { z-index: 3; background: #f5f7fa; }
.component-table .component-cell-qty { text-align: left; white-space: nowrap; }
.component-table .component-cell-money,
.component-table .component-cell-rate { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.component-table .component-cell-qty input { text-align: left; }
.component-table .component-cell-money input,
.component-table .component-cell-rate input { text-align: right; }
.component-tree-col { width: 54px; text-align: center !important; white-space: nowrap; }
.component-tree-toggle { min-width: 28px; height: 26px; border: 1px solid #cdd7e7; border-radius: 6px; background: #fff; color: #2f65c8; font-weight: 800; line-height: 1; }
.component-tree-toggle.loading { color: #667085; background: #f5f7fa; }
.component-tree-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: #e9f7ef; color: #2f9e68; font-size: 11px; font-weight: 800; }
.component-child-row td { background: #fbfcff; }
.component-child-indent { display: inline-block; width: 16px; height: 1px; margin-right: 4px; border-top: 1px solid #cdd7e7; vertical-align: middle; }
.component-child-message td { color: #8a94a6; background: #fbfcff; font-size: 12px; }
.component-child-message.error td { color: #b42318; background: #fff7f7; }
.component-source-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; background: #e9f7ef; color: #2f9e68; font-size: 11px; font-weight: 700; }
.component-alt-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #eef2f7; color: #667085; font-size: 11px; font-weight: 800; }
.component-alt-badge.has-alt { background: #fff4dc; color: #b97709; }
.component-child-loading td { color: #667085; background: #fbfcff; }
.component-edit-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.component-edit-actions .btn-sm-edit { flex: 0 0 auto; min-height: 24px; padding: 2px 7px; font-size: 11px; line-height: 1.2; white-space: nowrap; }
.component-pn { font-family: monospace; font-size: 12px; color: #444; }
.component-sub { font-size: 11px; color: #aaa; margin-top: 2px; }
.component-alt-row td { background: #fbfcff; padding-top: 0; }
.component-alt-box { margin: 0 0 8px 26px; border-left: 3px solid #f4b740; padding: 7px 10px; background: #fffaf0; border-radius: 0 6px 6px 0; }
.component-alt-title { font-size: 11px; font-weight: 700; color: #8a5a00; margin-bottom: 4px; }
.component-alt-item { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; font-size: 12px; color: #333; padding: 3px 0; }
.component-alt-item strong { font-family: monospace; color: #1a1a2e; }
.component-alt-meta { color: #7c8492; font-size: 11px; }
.component-candidate { cursor: pointer; }
.component-candidate:hover td { background: #f8f8f8; }
.component-diff-side { min-width: 0; }
.component-diff-side strong { display: block; font-size: 11px; color: #888; margin-bottom: 2px; }
.component-empty { color:#bbb; font-size:12px; padding:8px 0; }
.detail-actions { display:flex; gap:8px; flex-wrap:wrap; margin:14px 0 6px; }
.detail-toolbar { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap; padding: 8px 0 10px; border-bottom: 1px solid #f0f0f0; margin-bottom: 8px; flex: 0 0 auto; }
.detail-toolbar-edit { margin-left: auto; }
.detail-toolbar .btn-sm-edit { margin: 0; }
.component-body { flex:1; padding:14px 8px; max-width:1280px; width:100%; margin:0 auto; overflow-y:auto; }
.component-context { background:#fff; border:1px solid #e8e8e8; border-radius:8px; padding:10px 12px; margin-bottom:10px; }
.component-context-title { font-size:15px; font-weight:700; color:#1a1a2e; }
.component-context-sub { font-size:12px; color:#777; margin-top:4px; font-family:monospace; }
.parallel-shell { display: flex; flex-direction: column; gap: 12px; }
.parallel-controls { background:#fff; border:1px solid #e4e7ee; border-radius:8px; padding:12px; }
.parallel-layout { display:grid; grid-template-columns:minmax(280px, 360px) minmax(0, 1fr); gap:12px; align-items:start; }
.parallel-panel { background:#fff; border:1px solid #e4e7ee; border-radius:8px; min-width:0; overflow:hidden; }
.parallel-panel-head { min-height:42px; padding:10px 12px; border-bottom:1px solid #edf0f5; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.parallel-panel-title { font-size:13px; font-weight:700; color:#1a1a2e; }
.parallel-panel-count { font-size:11px; color:#888; white-space:nowrap; }
.parallel-candidate-list { max-height:calc(100vh - 330px); min-height:220px; overflow:auto; }
.parallel-candidate-card { display:grid; grid-template-columns:minmax(0, 1fr) 58px; gap:10px; padding:10px 12px; border-bottom:1px solid #f0f2f5; cursor:pointer; align-items:center; }
.parallel-candidate-card:last-child { border-bottom:none; }
.parallel-candidate-card:hover { background:#f8fbff; }
.parallel-candidate-card.selected { background:#eef5ff; box-shadow:inset 3px 0 0 #4f8ef7; }
.parallel-card-main { min-width:0; }
.parallel-maker-pn { font-family:monospace; font-size:13px; font-weight:700; color:#1a1a2e; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.parallel-genuine { font-family:monospace; font-size:12px; color:#555; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.parallel-maker { font-size:11px; color:#999; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.parallel-count-box { border:1px solid #dce8ff; border-radius:6px; background:#f6f9ff; padding:5px 4px; text-align:center; color:#1a6fd4; }
.parallel-count-box strong { display:block; font-size:14px; line-height:1.1; }
.parallel-count-box span { display:block; font-size:10px; margin-top:2px; color:#6d86aa; }
.parallel-compare-head { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:12px; border-bottom:1px solid #edf0f5; background:#fafbfc; }
.parallel-assy-box { border:1px solid #e3e7ef; border-radius:8px; background:#fff; padding:10px; min-width:0; }
.parallel-assy-label { font-size:11px; color:#777; margin-bottom:4px; }
.parallel-assy-pn { font-family:monospace; font-size:14px; font-weight:700; color:#1a1a2e; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.parallel-assy-sub { font-family:monospace; font-size:12px; color:#777; margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.parallel-result-scroll { overflow:auto; max-height:calc(100vh - 390px); }
.parallel-result-table { width:100%; border-collapse:collapse; font-size:12px; table-layout:fixed; }
.parallel-result-table th { position:sticky; top:0; z-index:1; background:#f5f7fa; color:#555; font-weight:700; padding:8px; text-align:left; border-bottom:2px solid #e0e0e0; }
.parallel-result-table td { padding:8px; border-bottom:1px solid #f0f0f0; vertical-align:top; }
.parallel-result-table th:nth-child(1), .parallel-result-table td:nth-child(1) { width:20%; }
.parallel-result-table th:nth-child(2), .parallel-result-table td:nth-child(2) { width:12%; }
.parallel-status { display:inline-flex; align-items:center; justify-content:center; min-width:54px; border-radius:999px; padding:2px 8px; font-size:11px; font-weight:700; }
.parallel-status.same { background:#eef8f1; color:#188344; }
.parallel-status.different { background:#fff1f0; color:#c93f3f; }
@media (max-width: 900px) {
  .parallel-layout { grid-template-columns:1fr; }
  .parallel-candidate-list, .parallel-result-scroll { max-height:none; }
  .parallel-compare-head { grid-template-columns:1fr; }
}

/* =============================================
   商品管理・互換管理・ログ画面
============================================= */
.mgmt-body      { flex: 1; padding: 20px 16px; max-width: 960px; width: 100%; margin: 0 auto; overflow-y: auto; }
.mgmt-toolbar   { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.mgmt-search    { flex: 1; min-width: 200px; border: 1px solid #ddd; border-radius: 8px; padding: 8px 12px; font-size: 14px; outline: none; }
.mgmt-search:focus { border-color: var(--dcats-brand-red); box-shadow: 0 0 0 3px var(--dcats-brand-red-focus); }
.kikan-mgmt-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.kikan-mgmt-search-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-width: 0; }
.kikan-mgmt-search-controls .mgmt-search { width: 100%; min-width: 0; }
.kikan-mgmt-new-group { justify-self: end; }
.btn-primary    { background: var(--dcats-brand-red); color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn-primary:hover { background: var(--dcats-brand-red-hover); }
.btn-sm-edit    { background: #f0f4ff; color: #4f8ef7; border: 1px solid #4f8ef7; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.btn-sm-del     { background: #fff0f0; color: #e24b4a; border: 1px solid #e24b4a; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.mgmt-table     { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.mgmt-table th  { background: #f5f7fa; color: #555; font-weight: 600; padding: 10px 12px; text-align: left; border-bottom: 2px solid #e0e0e0; }
.mgmt-table td  { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.mgmt-table tr:last-child td { border-bottom: none; }
@media (max-width: 767px) {
  .kikan-mgmt-toolbar { grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: stretch; }
  .kikan-mgmt-new-group { justify-self: start; }
}
.mgmt-table tr:hover td { background: #f8f8f8; }
.mgmt-pn        { font-family: monospace; font-size: 12px; }
.mgmt-sub       { font-size: 11px; color: #aaa; margin-top: 2px; }
.mgmt-actions   { display: flex; gap: 6px; flex-wrap: nowrap; }
.mgmt-count     { font-size: 12px; color: #888; margin-bottom: 8px; }
.mgmt-section-title { font-size: 14px; font-weight: 800; color: #1a1a2e; margin: 12px 0 6px; }
#screen-parts-mgmt .mgmt-body { max-width: 1160px; }
.parts-mgmt-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.parts-mgmt-search-form { display: grid; gap: 6px; min-width: 0; }
.parts-mgmt-control-label { color: #475467; font-size: 11px; font-weight: 800; line-height: 1.2; }
.parts-mgmt-search-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; min-width: 0; }
.parts-mgmt-search-controls .mgmt-search { width: 100%; min-width: 0; }
.parts-mgmt-search-button { min-width: 88px; }
.parts-mgmt-search-button:disabled { cursor: wait; opacity: .62; }
.parts-mgmt-create-panel { display: grid; gap: 6px; min-width: 176px; border-left: 1px solid #d7dce3; padding-left: 24px; }
.parts-mgmt-add-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; border: 1px solid #667085; border-radius: 8px; padding: 7px 14px; background: #fff; color: #344054; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.parts-mgmt-add-button:hover { border-color: #344054; background: #f4f6f8; }
.parts-mgmt-add-button:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
#parts-mgmt-list { overflow-x: auto; border-radius: 10px; }
#parts-mgmt-list .parts-mgmt-table { min-width: 1040px; }
.parts-mgmt-table .parts-mgmt-weight { width: 152px; text-align: right; white-space: nowrap; }
.parts-mgmt-weight-sort { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; width: 100%; border: 0; border-radius: 6px; padding: 3px 4px; background: transparent; color: inherit; font: inherit; font-weight: inherit; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.parts-mgmt-weight-sort:hover { background: #e8eef7; color: #174ea6; }
.parts-mgmt-weight-sort:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
.parts-mgmt-weight-sort-indicator { color: #667085; font-size: 10px; }
.parts-mgmt-weight-sort-order { color: #174ea6; font-size: 10px; font-weight: 800; }
.parts-mgmt-weight-error { margin-bottom: 8px; border: 1px solid #f0b8b8; border-radius: 8px; padding: 9px 11px; background: #fff5f5; color: #b42318; font-size: 12px; font-weight: 700; }
@media (max-width: 760px) {
  #screen-parts-mgmt .mgmt-body { padding: 12px 8px; }
  #screen-parts-mgmt .parts-mgmt-toolbar { grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: stretch; }
  #screen-parts-mgmt .mgmt-search { min-width: 0; }
  .parts-mgmt-search-controls { grid-template-columns: minmax(0, 1fr) 80px; }
  .parts-mgmt-search-button { min-width: 0; }
  .parts-mgmt-create-panel { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; border-top: 1px solid #e0e4ea; border-left: 0; padding-top: 12px; padding-left: 0; }
  .parts-mgmt-add-button { min-height: 38px; }
}
.component-name-untranslated-filter { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 11px; border: 1px solid #d6dce5; border-radius: 8px; background: #fff; color: #344054; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.component-name-untranslated-filter input { width: 16px; height: 16px; margin: 0; accent-color: #1a6fd4; }
#screen-component-name-master-mgmt .mgmt-body { max-width: 1180px; }
.component-name-master-table-wrap { width: 100%; overflow-x: auto; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.component-name-master-table { min-width: 860px; box-shadow: none; border-radius: 0; }
.component-name-master-table th:nth-child(1) { width: 64px; }
.component-name-master-table th:nth-child(2) { width: 25%; }
.component-name-master-table th:nth-child(3) { width: 38%; }
.component-name-master-table th:nth-child(4) { width: 140px; }
.component-name-master-table th:nth-child(5) { width: 190px; }
.component-name-master-translations { display: grid; gap: 5px; min-width: 0; }
.component-name-master-translations span { min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.component-name-master-translations b { display: inline-block; min-width: 34px; color: #667085; font-size: 10px; }
.component-name-master-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.component-name-translation-card { max-width: 620px; }
.component-name-translation-help { margin: -6px 0 14px; color: #667085; font-size: 12px; line-height: 1.6; }
.component-name-translation-source { display: grid; gap: 3px; margin-bottom: 16px; padding: 11px 13px; border-left: 3px solid #1a6fd4; background: #f4f8fd; }
.component-name-translation-source span { color: #667085; font-size: 11px; font-weight: 700; }
.component-name-translation-source strong { color: #172033; font-size: 16px; overflow-wrap: anywhere; }
#component-name-request-list { overflow-x: auto; padding-bottom: 2px; position: relative; }
.component-name-request-table { min-width: 1290px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.component-name-request-table th:nth-child(1), .component-name-request-table td:nth-child(1) { width: 64px; }
.component-name-request-table th:nth-child(2), .component-name-request-table td:nth-child(2) { width: 320px; }
.component-name-request-table th:nth-child(3), .component-name-request-table td:nth-child(3) { width: 180px; }
.component-name-request-table th:nth-child(4), .component-name-request-table td:nth-child(4) { width: 150px; }
.component-name-request-table th:nth-child(5), .component-name-request-table td:nth-child(5) { width: 220px; }
.component-name-request-table th:nth-child(6), .component-name-request-table td:nth-child(6) {
  width: 360px;
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -8px 0 14px rgba(16, 24, 40, 0.08);
}
.component-name-request-table th:nth-child(6) { z-index: 3; background: #f5f7fa; }
.component-name-request-table tr:hover td:nth-child(6) { background: #fff; }
.component-name-request-table th:nth-child(2) { color: #1a1a2e; font-weight: 800; }
.component-name-request-name {
  display: block;
  min-height: 42px;
  padding: 8px 10px;
  border-left: 4px solid #4f8ef7;
  border-radius: 8px;
  background: #f4f8ff;
  color: #182230;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.component-name-request-name strong { display: block; font-size: 14px; font-weight: 800; }
.component-name-request-name .mgmt-sub { color: #667085; margin-top: 4px; }
.component-name-request-actions { display: flex; flex-direction: column; gap: 7px; min-width: 240px; }
.component-name-request-actions-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.component-name-request-actions-row .form-select { flex: 1 1 150px; min-width: 150px; }
.component-name-request-approve-row { display: flex; justify-content: flex-end; }
#screen-purchase-mgmt .mgmt-body { max-width: 1280px; }
.purchase-mgmt-hint { color: #667085; font-size: 12px; line-height: 1.6; margin: -4px 0 12px; }
.purchase-link-status { min-width: 150px; }
.purchase-link-summary { color: #526173; font-weight: 700; }
.purchase-unlinked-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border: 1px solid #e9b949; border-radius: 6px; background: #fff8df; color: #8a5b00; font-size: 11px; font-weight: 800; }
.purchase-multiple-link-badge { display: inline-flex; align-items: center; min-height: 22px; margin-bottom: 6px; padding: 1px 7px; border: 1px solid #7ca8e8; border-radius: 6px; background: #eef5ff; color: #1857a4; font-size: 11px; font-weight: 800; }
.purchase-mgmt-table-wrap { width: 100%; overflow-x: hidden; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); background: #fff; }
.purchase-mgmt-table { box-shadow: none; border-radius: 0; table-layout: fixed; }
 .purchase-mgmt-table th:nth-child(1), .purchase-mgmt-table td:nth-child(1) { width: 14%; }
 .purchase-mgmt-table th:nth-child(2), .purchase-mgmt-table td:nth-child(2) { width: 15%; }
 .purchase-mgmt-table th:nth-child(3), .purchase-mgmt-table td:nth-child(3) { width: 11%; text-align: right; }
 .purchase-mgmt-table th:nth-child(4), .purchase-mgmt-table td:nth-child(4) { width: 11%; text-align: right; }
 .purchase-mgmt-table th:nth-child(5), .purchase-mgmt-table td:nth-child(5) { width: 7%; text-align: right; }
 .purchase-mgmt-table th:nth-child(6), .purchase-mgmt-table td:nth-child(6) { width: auto; }
 .purchase-mgmt-table th:nth-child(7), .purchase-mgmt-table td:nth-child(7) { width: 92px; text-align: right; }
.purchase-mgmt-table td { vertical-align: top; }
.purchase-mgmt-table tr.purchase-record-updated td { animation: purchase-record-updated 1.8s ease-out; }
@keyframes purchase-record-updated {
  0% { background: #fff3bf; }
  100% { background: #fff; }
}
.purchase-catalog-table th:nth-child(1), .purchase-catalog-table td:nth-child(1) { width: 62px; }
.purchase-catalog-table th:nth-child(2), .purchase-catalog-table td:nth-child(2) { width: 13%; }
.purchase-catalog-table th:nth-child(3), .purchase-catalog-table td:nth-child(3) { width: 24%; }
.purchase-catalog-table th:nth-child(4), .purchase-catalog-table td:nth-child(4) { width: auto; }
.purchase-catalog-table th:nth-child(5), .purchase-catalog-table td:nth-child(5) { width: 12%; }
.purchase-catalog-table th:nth-child(6), .purchase-catalog-table td:nth-child(6) { width: 104px; text-align: right; }
.purchase-status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border: 1px solid #b8c4d4; border-radius: 6px; background: #f4f6f8; color: #455468; font-size: 11px; font-weight: 800; }
.purchase-status-badge.missing-sl { border-color: #e9b949; background: #fff8df; color: #8a5b00; }
.purchase-status-badge.missing-both { border-color: #d77878; background: #fff0e8; color: #982c20; }
.purchase-status-badge.unlinked, .purchase-status-badge.core-unlinked { border-color: #e08b8b; background: #fff1f1; color: #a12828; }
.purchase-status-badge.linked { border-color: #86c89b; background: #edf9f1; color: #18733a; }
.purchase-catalog-source { color: #667085; font-size: 11px; line-height: 1.45; margin-top: 3px; overflow-wrap: anywhere; }
 .purchase-product-list { display: grid; gap: 6px; }
 .purchase-product-item { border-left: 3px solid #dce8ff; padding-left: 8px; min-width: 0; }
 .purchase-product-main { font-family: monospace; font-size: 12px; font-weight: 800; color: #1a1a2e; overflow-wrap: anywhere; }
 .purchase-product-sub { color: #667085; font-size: 11px; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
 .purchase-product-actions { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
 .purchase-price-cell { font-size: 14px; font-weight: 800; color: #1a1a2e; font-variant-numeric: tabular-nums; white-space: nowrap; }
 .purchase-price-cell.sales { color: #1a8c3e; }
 .purchase-link-card { max-width: 780px; }
 .purchase-link-context { border: 1px solid #e7edf6; border-radius: 10px; background: #f8fbff; padding: 10px 12px; margin: 8px 0 12px; font-size: 12px; color: #455468; line-height: 1.55; }
 .purchase-link-context strong { display: block; color: #1a1a2e; font-size: 14px; margin-bottom: 2px; }
.purchase-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.purchase-link-selected { min-height: 20px; color: #1a6fd4; font-size: 12px; margin-top: 8px; }
.purchase-link-error { color: #d33; font-size: 12px; min-height: 18px; margin-top: 8px; }
#purchase-link-candidates .candidate-item:disabled { cursor: default; opacity: 0.62; background: #f4f6f8; }
.manufacturing-cost-body { max-width: 1320px; }
.manufacturing-cost-toolbar { display: grid; grid-template-columns: minmax(330px, .8fr) minmax(848px, 1.6fr); align-items: stretch; gap: 10px; }
.manufacturing-cost-toolbar .mgmt-search { min-width: 0; }
.manufacturing-cost-query-field { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-width: 0; }
.manufacturing-cost-query-field label { color: #64748b; font-size: 11px; font-weight: 700; line-height: 1.1; }
.manufacturing-cost-query-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.manufacturing-cost-query-row .mgmt-search { width: 100%; }
.manufacturing-cost-query-row .btn-secondary, .manufacturing-cost-query-row .btn-primary { min-height: 36px; padding: 0 12px; white-space: nowrap; }
.manufacturing-cost-import-open { border-color: #9fc0ef; color: #175cd3; background: #f5f9ff; }
.manufacturing-cost-import-entry { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-top: 1px solid #e7edf4; background: #f5f9ff; }
.manufacturing-cost-import-entry > div { min-width: 0; }
.manufacturing-cost-import-entry strong { color: #123b73; font-size: 13px; }
.manufacturing-cost-import-entry p { margin: 4px 0 0; color: #667085; font-size: 12px; line-height: 1.5; }
.manufacturing-cost-import-entry .manufacturing-cost-import-open { flex: 0 0 auto; min-height: 40px; padding: 0 16px; background: #fff; font-weight: 800; }
.form-card.manufacturing-cost-import-card { display: flex; flex-direction: column; width: min(1120px, calc(100vw - 24px)); max-width: 1120px; max-height: calc(100dvh - 24px); margin: 12px; padding: 0; overflow: hidden; border-radius: 10px; }
.manufacturing-cost-import-header { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid #e4e9f1; }
.manufacturing-cost-import-header h3 { margin: 0 0 4px; }
.manufacturing-cost-import-header p { margin: 0; color: #667085; font-size: 12px; line-height: 1.5; }
.manufacturing-cost-import-header .btn-cancel { min-height: 34px; flex: 0 0 auto; }
.manufacturing-cost-import-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.manufacturing-cost-import-source { display: grid; gap: 10px; padding: 16px 20px 8px; }
.manufacturing-cost-import-source .btn-primary { min-height: 36px; }
.manufacturing-cost-import-source small { color: #667085; font-size: 11px; line-height: 1.5; }
.manufacturing-cost-import-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 200px; padding: 24px 16px; border: 2px dashed #9fc0ef; border-radius: 10px; background: #f5f9ff; text-align: center; }
.manufacturing-cost-import-dropzone strong { color: #123b73; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.manufacturing-cost-import-drop-or { color: #667085; font-size: 12px; }
.manufacturing-cost-import-dropzone.is-dragover { border-color: #175cd3; background: #e4efff; }
.manufacturing-cost-import-dropzone.is-reading { opacity: .65; }
.manufacturing-cost-import-dropzone.has-file { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; min-height: 0; gap: 8px 12px; padding: 12px 16px; text-align: left; }
.manufacturing-cost-import-dropzone.has-file strong { font-size: 13px; }
.manufacturing-cost-import-dropzone.has-file .manufacturing-cost-import-drop-or { display: none; }
.manufacturing-cost-import-dropzone.has-file small { grid-column: 2 / -1; }
.manufacturing-cost-import-dropzone .btn-primary:focus-visible { outline: 3px solid #175cd3; outline-offset: 3px; }
.manufacturing-cost-import-file-name { min-width: 0; color: #344054; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.manufacturing-cost-import-status { flex: 0 0 auto; min-height: 20px; margin: 0 20px 8px; color: #667085; font-size: 12px; line-height: 1.45; }
.manufacturing-cost-import-status.is-loading { color: #175cd3; }
.manufacturing-cost-import-status.is-success { color: #16803a; font-weight: 800; }
.manufacturing-cost-import-status.is-error { color: #c62828; font-weight: 800; }
.manufacturing-cost-import-config { padding: 0 20px 12px; }
.manufacturing-cost-import-controls { display: grid; grid-template-columns: minmax(190px, 1.4fr) 140px minmax(180px, 1fr) minmax(180px, 1fr); gap: 8px; align-items: end; border: 1px solid #d9e7fa; border-radius: 9px; background: #f8fbff; padding: 10px; }
.manufacturing-cost-import-controls input, .manufacturing-cost-import-controls select { min-height: 34px; }
.manufacturing-cost-import-controls :disabled { color: #98a2b3; background: #f2f4f7; }
.manufacturing-cost-import-mapping-note { min-height: 18px; margin: 5px 2px 7px; color: #667085; font-size: 11px; line-height: 1.4; }
.manufacturing-cost-import-preview-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 6px; }
.manufacturing-cost-import-preview-head > strong { color: #111827; font-size: 13px; }
.manufacturing-cost-import-preview-head > span { color: #475467; font-size: 11px; }
.manufacturing-cost-import-preview-head > div { display: flex; gap: 6px; }
.manufacturing-cost-import-preview { max-height: min(42vh, 420px); overflow: auto; border: 1px solid #dfe6ee; border-radius: 8px; background: #fff; }
.manufacturing-cost-import-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.manufacturing-cost-import-table th, .manufacturing-cost-import-table td { padding: 7px 9px; border-bottom: 1px solid #edf0f5; text-align: left; vertical-align: middle; }
.manufacturing-cost-import-table th { position: sticky; top: 0; z-index: 1; background: #eef4ff; color: #344054; font-size: 11px; font-weight: 900; }
.manufacturing-cost-import-table td { color: #344054; font-size: 12px; }
.manufacturing-cost-import-table th:nth-child(1), .manufacturing-cost-import-table td:nth-child(1) { width: 42px; text-align: center; }
.manufacturing-cost-import-table th:nth-child(2), .manufacturing-cost-import-table td:nth-child(2) { width: 24%; }
.manufacturing-cost-import-table th:nth-child(3), .manufacturing-cost-import-table td:nth-child(3) { width: 90px; text-align: right; }
.manufacturing-cost-import-table th:nth-child(5), .manufacturing-cost-import-table td:nth-child(5) { width: 100px; text-align: center; }
.manufacturing-cost-import-table td strong { color: #1a1a2e; font-size: 12px; overflow-wrap: anywhere; }
.manufacturing-cost-import-table td small { color: #667085; line-height: 1.35; overflow-wrap: anywhere; }
.manufacturing-cost-import-confidence { display: inline-flex; align-items: center; justify-content: center; min-width: 62px; min-height: 22px; border-radius: 999px; padding: 2px 8px; font-size: 10px; font-weight: 900; }
.manufacturing-cost-import-confidence.high { color: #16803a; background: #e9f8ed; border: 1px solid #bdebc8; }
.manufacturing-cost-import-confidence.medium { color: #b54708; background: #fff7e6; border: 1px solid #fedf89; }
.manufacturing-cost-import-confidence.low { color: #c62828; background: #fff2f2; border: 1px solid #f4c7c7; }
.manufacturing-cost-import-preview-note, .manufacturing-cost-import-pdf-note { color: #667085; font-size: 11px; line-height: 1.4; }
.manufacturing-cost-import-preview-note { padding: 8px 10px; }
.manufacturing-cost-import-pdf-note { margin: 6px 2px 0; }
.manufacturing-cost-import-footer { flex: 0 0 auto; margin: 0; padding: 12px 20px 16px; border-top: 1px solid #e4e9f1; }
.manufacturing-cost-import-footer .btn-primary { min-height: 40px; }
.manufacturing-cost-import-card .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.manufacturing-cost-config-panel { display: grid; grid-template-columns: minmax(220px, .58fr) minmax(620px, 1.42fr); gap: 8px; min-width: 0; }
.manufacturing-cost-flow-card { min-width: 0; border: 1px solid #dfe7f3; border-radius: 10px; background: #fff; padding: 9px 10px; box-shadow: 0 1px 5px rgba(15,23,42,0.05); }
.manufacturing-cost-flow-card.target { background: #f8fbff; border-color: #d8e7ff; }
.manufacturing-cost-flow-card.addition { background: #fffdf7; border-color: #f2dfb8; }
.manufacturing-cost-flow-head { display: flex; align-items: center; gap: 7px; min-height: 22px; margin-bottom: 7px; color: #111827; }
.manufacturing-cost-flow-step { display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; border-radius: 999px; background: #2563eb; color: #fff; font-size: 11px; font-weight: 900; }
.manufacturing-cost-flow-card.addition .manufacturing-cost-flow-step { background: #b7791f; }
.manufacturing-cost-flow-head strong { font-size: 13px; font-weight: 900; }
.manufacturing-cost-flow-note { color: #667085; font-size: 11px; margin-left: auto; white-space: nowrap; }
.manufacturing-cost-settings-btn { min-height: 26px; padding: 0 10px; font-size: 11px; white-space: nowrap; }
.manufacturing-cost-target-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, .72fr); gap: 7px; align-items: end; }
.manufacturing-cost-company-config-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 8px; }
.manufacturing-cost-company-config { min-width: 0; border: 1px solid #dfe7f3; border-radius: 7px; padding: 7px; }
.manufacturing-cost-company-config.gltek { background: #f7fbff; border-color: #cfe0f7; }
.manufacturing-cost-company-config.dkd { background: #f8fbf8; border-color: #cfe5d5; }
.manufacturing-cost-company-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; min-height: 26px; margin-bottom: 5px; }
.manufacturing-cost-company-head strong { color: #1f2937; font-size: 11px; font-weight: 900; }
.manufacturing-cost-addition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; align-items: end; }
.manufacturing-cost-company-config.gltek .manufacturing-cost-addition-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.manufacturing-cost-readonly-total { color: #166534; background: #eef8f1; border-color: #bdddc7; font-weight: 900; }
.manufacturing-cost-formula { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: -1px 0 7px; color: #667085; font-size: 11px; line-height: 1.35; }
.manufacturing-cost-formula-token { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; background: #f3f6fb; color: #455468; border: 1px solid #e5edf8; font-weight: 800; }
.manufacturing-cost-formula-token.added { background: #fff7e6; color: #8a5a00; border-color: #f4d58a; }
.manufacturing-cost-formula-token.gltek { background: #edf5ff; color: #175cd3; border-color: #cfe0f7; }
.manufacturing-cost-formula-token.dkd { background: #eef8f1; color: #237447; border-color: #cfe5d5; }
.manufacturing-cost-formula-token.total { background: #e9f8ed; color: #16803a; border-color: #bdebc8; }
.manufacturing-cost-formula-plus, .manufacturing-cost-formula-eq { color: #94a3b8; font-weight: 900; }
.manufacturing-cost-category-core-card { max-width: 760px; }
.manufacturing-cost-category-core-panel { border: 1px solid #f1e0bd; border-radius: 10px; background: #fffdf7; padding: 10px; }
.manufacturing-cost-category-core-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.manufacturing-cost-category-core-head strong { color: #8a5a00; font-size: 12px; font-weight: 900; }
.manufacturing-cost-category-core-head span { color: #8a94a6; font-size: 11px; line-height: 1.3; text-align: right; }
.manufacturing-cost-category-core-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.manufacturing-cost-category-core-row { display: grid; grid-template-columns: minmax(80px, 1fr) minmax(92px, .85fr); align-items: center; gap: 6px; border: 1px solid #f1e0bd; border-radius: 8px; background: #fffaf0; padding: 5px 7px; }
.manufacturing-cost-category-core-row label { color: #344054; font-size: 11px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manufacturing-cost-category-core-row input { min-height: 28px; padding: 3px 7px; text-align: right; font-size: 12px; }
.manufacturing-cost-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.manufacturing-cost-field label { min-width: 0; overflow-wrap: anywhere; color: #64748b; font-size: 11px; font-weight: 700; line-height: 1.1; }
.manufacturing-cost-field input, .manufacturing-cost-field select { width: 100%; }
.manufacturing-cost-listbar { display: grid; grid-template-columns: minmax(200px, 1fr) auto auto minmax(220px, 1fr) auto auto minmax(160px, .8fr); align-items: end; gap: 8px; margin: 10px 0 12px; }
.manufacturing-cost-listbar .btn-secondary, .manufacturing-cost-listbar .btn-primary, .manufacturing-cost-listbar .btn-danger { min-height: 36px; white-space: nowrap; }
.manufacturing-cost-listbar .btn-danger { border: 1px solid #f3b4b4; background: #fff5f5; color: #c62828; border-radius: 8px; font-weight: 700; cursor: pointer; padding: 0 12px; }
.manufacturing-cost-listbar .btn-danger:hover { background: #ffe8e8; }
.manufacturing-cost-status { color: #64748b; font-size: 12px; line-height: 1.4; min-height: 18px; }
.manufacturing-cost-hint { color: #667085; font-size: 12px; line-height: 1.6; margin: -4px 0 12px; }
.manufacturing-cost-candidates { margin: 12px 0; }
.manufacturing-cost-candidates:empty { display: none; }
.manufacturing-cost-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.manufacturing-cost-section-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.manufacturing-cost-section-title strong { color: #111827; font-size: 14px; font-weight: 900; }
.manufacturing-cost-section-title span { color: #667085; font-size: 12px; font-weight: 700; }
.manufacturing-cost-section-note { color: #667085; font-size: 12px; line-height: 1.45; margin-top: 2px; }
.manufacturing-cost-section-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.manufacturing-cost-section-badge.candidate { color: #1d4ed8; background: #eaf3ff; border: 1px solid #bfdbfe; }
.manufacturing-cost-section-badge.selected { color: #16803a; background: #e9f8ed; border: 1px solid #bdebc8; }
.manufacturing-cost-candidate-panel { border: 1px solid #bdd7ff; border-radius: 10px; background: #f7fbff; padding: 12px; box-shadow: 0 1px 5px rgba(37,99,235,0.08); }
.manufacturing-cost-candidate-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.manufacturing-cost-candidate-title { font-size: 13px; font-weight: 800; color: #1a1a2e; }
.manufacturing-cost-candidate-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.manufacturing-cost-candidate-actions .btn-secondary, .manufacturing-cost-candidate-actions .btn-primary { min-height: 30px; padding: 0 10px; font-size: 12px; }
.manufacturing-cost-candidate-list { display: grid; gap: 6px; max-height: 300px; overflow: auto; padding-right: 2px; }
.manufacturing-cost-import-result-summary { margin: 0 0 8px; border: 1px solid #c7dcff; border-radius: 8px; background: #edf5ff; padding: 8px 10px; color: #175cd3; font-size: 12px; font-weight: 900; line-height: 1.45; }
.manufacturing-cost-import-unregistered { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); align-items: center; gap: 10px; margin-bottom: 8px; border: 1px solid #f4c7c7; border-radius: 8px; background: #fff7f7; padding: 9px 10px; }
.manufacturing-cost-import-unregistered > div:first-child { display: grid; gap: 2px; }
.manufacturing-cost-import-unregistered strong { color: #b42318; font-size: 12px; font-weight: 900; }
.manufacturing-cost-import-unregistered > div:first-child span { color: #7a271a; font-size: 11px; line-height: 1.4; }
.manufacturing-cost-import-unregistered-list { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.manufacturing-cost-import-unregistered-list span { display: inline-flex; align-items: center; min-height: 24px; border: 1px solid #f0b9b9; border-radius: 999px; background: #fff; padding: 2px 8px; color: #912018; font-size: 11px; font-weight: 900; overflow-wrap: anywhere; }
.manufacturing-cost-import-group-list { gap: 8px; max-height: 420px; }
.manufacturing-cost-import-result-group { display: grid; gap: 6px; border: 1px solid #cfe0f8; border-radius: 9px; background: #f4f8ff; padding: 8px; }
.manufacturing-cost-import-result-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 0 2px; }
.manufacturing-cost-import-result-group-head strong { color: #123b73; font-size: 13px; font-weight: 900; overflow-wrap: anywhere; }
.manufacturing-cost-import-result-group-head span { flex: 0 0 auto; color: #175cd3; font-size: 11px; font-weight: 900; }
.manufacturing-cost-import-result-group-rows { display: grid; gap: 6px; }
.manufacturing-cost-import-result-limit { border-radius: 6px; background: #fff7e6; padding: 7px 8px; color: #8a5a00; font-size: 11px; font-weight: 800; line-height: 1.4; }
.manufacturing-cost-candidate-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid #edf2fb; border-radius: 8px; background: #fff; padding: 8px 10px; }
.manufacturing-cost-candidate-row.added { background: #f4fbf6; border-color: #cdebd4; }
.manufacturing-cost-candidate-row input { width: 16px; height: 16px; }
.manufacturing-cost-candidate-info { min-width: 0; }
.manufacturing-cost-candidate-main { display: block; font-size: 13px; font-weight: 800; color: #1a1a2e; line-height: 1.35; overflow-wrap: anywhere; }
.manufacturing-cost-candidate-sub { display: block; color: #667085; font-size: 11px; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.manufacturing-cost-candidate-data-labels { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.manufacturing-cost-candidate-side { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.manufacturing-cost-candidate-kind { color: #1a6fd4; background: #edf5ff; border: 1px solid #d7e9ff; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.manufacturing-cost-candidate-added { color: #16803a; background: #e9f8ed; border: 1px solid #bdebc8; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.manufacturing-cost-selected-panel { margin-top: 12px; border: 1px solid #caead2; border-radius: 10px; background: #fbfffc; padding: 12px; box-shadow: 0 1px 5px rgba(22,128,58,0.08); }
.manufacturing-cost-selected-panel .mgmt-count { margin-left: auto; font-weight: 800; color: #16803a; }
.manufacturing-cost-selected-actions { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.manufacturing-cost-selected-actions .mgmt-count { margin-left: 0; }
.manufacturing-cost-selected-actions .btn-secondary { min-height: 30px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.manufacturing-cost-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
.manufacturing-cost-stat { border: 1px solid #e4ebf7; border-radius: 8px; background: #fbfdff; padding: 10px 12px; }
.manufacturing-cost-stat.gltek { border-color: #cfe0f7; background: #f7fbff; }
.manufacturing-cost-stat.dkd { border-color: #cfe5d5; background: #f8fbf8; }
.manufacturing-cost-stat span { display: block; color: #667085; font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.manufacturing-cost-stat b { color: #1a1a2e; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.manufacturing-cost-table-wrap { width: 100%; min-width: 0; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); background: #fff; }
.manufacturing-cost-table { width: 100%; min-width: 0; table-layout: fixed; box-shadow: none; border-radius: 0; }
.manufacturing-cost-table th, .manufacturing-cost-table td { min-width: 0; overflow-wrap: anywhere; }
.manufacturing-cost-table th:nth-child(1), .manufacturing-cost-main-row td:nth-child(1) { width: 22%; }
.manufacturing-cost-table th:nth-child(2), .manufacturing-cost-main-row td:nth-child(2) { width: 24%; }
.manufacturing-cost-table th:nth-child(3), .manufacturing-cost-main-row td:nth-child(3) { width: 22%; }
.manufacturing-cost-table th:nth-child(4), .manufacturing-cost-main-row td:nth-child(4) { width: 16%; text-align: right; }
.manufacturing-cost-table th:nth-child(5), .manufacturing-cost-main-row td:nth-child(5) { width: 16%; }
.manufacturing-cost-main-row td { vertical-align: top; }
.manufacturing-cost-product-main { font-size: 13px; font-weight: 800; color: #1a1a2e; line-height: 1.35; overflow-wrap: anywhere; }
.manufacturing-cost-product-facts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.manufacturing-cost-product-facts span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; max-width: 100%; min-height: 20px; padding: 2px 7px; border: 1px solid #d9e5f5; border-radius: 999px; background: #f8fbff; color: #344054; font-size: 10px; font-weight: 700; line-height: 1.2; }
.manufacturing-cost-product-facts b { color: #667085; font-size: 9px; font-weight: 900; }
.manufacturing-cost-product-sub { color: #667085; font-size: 11px; line-height: 1.45; margin-top: 3px; overflow-wrap: anywhere; }
.manufacturing-cost-money { font-size: 14px; line-height: 1.35; font-weight: 800; color: #1a1a2e; white-space: nowrap; font-variant-numeric: tabular-nums; }
.manufacturing-cost-breakdown { display: grid; gap: 3px; }
.manufacturing-cost-breakdown span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 1px solid #edf0f5; padding-bottom: 2px; }
.manufacturing-cost-breakdown span:last-child { border-bottom: 0; }
.manufacturing-cost-breakdown span.subtotal { margin-top: 1px; border-top: 1px solid #d7e2dc; padding-top: 3px; color: #166534; }
.manufacturing-cost-breakdown i { min-width: 0; color: #667085; font-size: 10px; font-style: normal; line-height: 1.3; }
.manufacturing-cost-breakdown b { color: #1f2937; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.manufacturing-cost-breakdown small { margin-top: -2px; color: #8a94a6; font-size: 9px; line-height: 1.3; text-align: right; }
.manufacturing-cost-company-total { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 5px; border-top: 1px solid #dce4ef; }
.manufacturing-cost-company-total > span { min-width: 0; color: #667085; font-size: 10px; line-height: 1.3; }
.manufacturing-cost-company-subtotal.gltek { color: #175cd3; }
.manufacturing-cost-company-subtotal.dkd { color: #237447; }
.manufacturing-cost-total { color: #1a8c3e; font-size: 16px; }
.manufacturing-cost-note { color: #8a94a6; font-size: 11px; line-height: 1.45; margin-top: 4px; }
.manufacturing-cost-missing { color: #b54708; font-weight: 700; }
.manufacturing-cost-detail-row td { padding: 0 10px 8px; background: #fff; border-top: 0; }
.manufacturing-cost-details { margin: 0; text-align: left; border: 1px solid #dce8fb; border-radius: 8px; background: #f8fbff; padding: 6px; }
.manufacturing-cost-details summary { cursor: pointer; color: #1a6fd4; font-size: 11px; font-weight: 800; list-style-position: inside; }
.manufacturing-cost-details summary::marker { color: #2f6fed; }
.manufacturing-cost-detail-loading { padding: 8px 10px; color: #667085; font-size: 11px; }
.manufacturing-cost-detail-badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.manufacturing-cost-detail-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 20px; border-radius: 999px; border: 1px solid #d7e8ff; background: #fff; color: #175cd3; padding: 1px 7px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.manufacturing-cost-detail-badge.total { color: #16803a; border-color: #c7ead4; background: #eefaf2; }
.manufacturing-cost-detail-badge.warn { color: #b54708; border-color: #fedf89; background: #fff7e6; }
.manufacturing-cost-component-list { display: grid; gap: 4px; margin-top: 6px; max-height: 360px; overflow-y: auto; padding-right: 2px; }
.manufacturing-cost-component-card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 6px; min-width: 0; border: 1px solid #e4e9f1; border-radius: 7px; background: #fff; padding: 6px 8px; font-size: 11px; }
.manufacturing-cost-component-card.missing-unit { background: #fffaf0; border-color: #fedf89; }
.manufacturing-cost-component-title { grid-column: span 2; min-width: 0; color: #1a1a2e; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.manufacturing-cost-component-part { grid-column: span 2; min-width: 0; color: #667085; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.manufacturing-cost-component-cell { min-width: 0; border: 1px solid #edf0f5; border-radius: 6px; background: #f8fafc; padding: 4px 6px; }
.manufacturing-cost-component-cell span { display: block; color: #667085; font-size: 10px; font-weight: 700; line-height: 1.2; }
.manufacturing-cost-component-cell b { display: block; color: #1a1a2e; font-size: 12px; font-weight: 800; line-height: 1.25; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.manufacturing-cost-component-subtotal { background: #eaf7ef; border-color: #c7ead4; }
.manufacturing-cost-component-subtotal b { color: #16803a; font-size: 13px; }
.manufacturing-cost-component-formula { color: #667085; font-size: 10px; line-height: 1.35; text-align: right; overflow-wrap: anywhere; }
.form-card.manufacturing-cost-target-delete-card { width: min(760px, calc(100vw - 24px)); max-width: 760px; max-height: calc(100vh - 24px); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.manufacturing-cost-target-delete-card h3 { flex: 0 0 auto; margin-bottom: 12px; }
.manufacturing-cost-target-delete-toolbar { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 0 0 10px; }
.manufacturing-cost-target-delete-toolbar button { min-height: 30px; padding: 0 10px; }
.manufacturing-cost-target-delete-toolbar button:disabled { opacity: .45; cursor: not-allowed; }
.manufacturing-cost-target-delete-count { margin-left: auto; color: #475467; font-size: 12px; font-weight: 800; white-space: nowrap; }
.manufacturing-cost-target-delete-list { flex: 1 1 auto; min-height: 120px; max-height: 58vh; overflow-y: auto; border: 1px solid #dde4ee; border-radius: 8px; background: #fff; }
.manufacturing-cost-target-delete-list > .empty { min-height: 120px; display: flex; align-items: center; justify-content: center; }
.manufacturing-cost-target-delete-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 62px; padding: 9px 12px; border-bottom: 1px solid #e7ebf1; cursor: pointer; }
.manufacturing-cost-target-delete-row:last-child { border-bottom: 0; }
.manufacturing-cost-target-delete-row:hover { background: #f8fafc; }
.manufacturing-cost-target-delete-row:has(input:checked) { background: #fff7f7; }
.manufacturing-cost-target-delete-row input { width: 17px; height: 17px; margin: 0; accent-color: #d43c3c; }
.manufacturing-cost-target-delete-info { min-width: 0; }
.manufacturing-cost-target-delete-info strong { display: block; color: #1a1a2e; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.manufacturing-cost-target-delete-info small { display: block; margin-top: 3px; color: #667085; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.manufacturing-cost-target-delete-amount { color: #344054; font-size: 13px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.manufacturing-cost-target-delete-status { flex: 0 0 auto; min-height: 18px; padding-top: 8px; color: #667085; font-size: 12px; line-height: 1.4; }
.manufacturing-cost-target-delete-status.is-error { color: #c62828; font-weight: 700; }
.manufacturing-cost-target-delete-card .form-footer { flex: 0 0 auto; }
.manufacturing-cost-target-delete-card .btn-danger { min-height: 40px; border: 1px solid #c62828; border-radius: 8px; background: #c62828; color: #fff; padding: 0 16px; font-size: 13px; font-weight: 800; cursor: pointer; }
.manufacturing-cost-target-delete-card .btn-danger:hover { background: #ad2020; }
.manufacturing-cost-target-delete-card .btn-danger:disabled { opacity: .45; cursor: not-allowed; }
@media(max-width:1220px){
  .manufacturing-cost-toolbar { grid-template-columns: minmax(0, 1fr); }
  .manufacturing-cost-listbar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .manufacturing-cost-listbar .manufacturing-cost-status { grid-column: 1 / -1; }
}
@media(max-width:900px){
  .manufacturing-cost-toolbar { grid-template-columns: 1fr; }
  .manufacturing-cost-config-panel { grid-template-columns: 1fr; }
  .manufacturing-cost-listbar { grid-template-columns: 1fr 1fr; }
  .manufacturing-cost-listbar .manufacturing-cost-field { grid-column: span 2; }
  .manufacturing-cost-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manufacturing-cost-import-controls { grid-template-columns: 1fr 1fr; }
  .manufacturing-cost-table, .manufacturing-cost-table tbody { display: block; }
  .manufacturing-cost-table thead { display: none; }
  .manufacturing-cost-main-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manufacturing-cost-table .manufacturing-cost-main-row td { display: block; width: auto; padding: 8px 10px; text-align: left; }
  .manufacturing-cost-main-row td:first-child { grid-column: 1 / -1; }
  .manufacturing-cost-main-row td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 5px; color: #475467; font-size: 11px; font-weight: 800; }
  .manufacturing-cost-main-row td:last-child:empty { display: none; }
  .manufacturing-cost-table .manufacturing-cost-detail-row { display: block; }
  .manufacturing-cost-table .manufacturing-cost-detail-row td { display: block; width: 100%; }
}
@media(max-width:700px){
  .manufacturing-cost-company-config-grid { grid-template-columns: 1fr; }
  .manufacturing-cost-company-config.gltek .manufacturing-cost-addition-grid { grid-template-columns: 1fr; }
}
@media(max-width:560px){
  .manufacturing-cost-toolbar, .manufacturing-cost-listbar, .manufacturing-cost-summary { grid-template-columns: 1fr; }
  .manufacturing-cost-query-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manufacturing-cost-query-row .mgmt-search { grid-column: 1 / -1; }
  .manufacturing-cost-import-entry { align-items: stretch; flex-direction: column; gap: 10px; padding: 12px; }
  .manufacturing-cost-query-row .btn-secondary, .manufacturing-cost-query-row .btn-primary { width: 100%; padding: 0 6px; font-size: 11px; white-space: normal; }
  .form-card.manufacturing-cost-import-card { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); margin: 6px; }
  .manufacturing-cost-import-header { padding: 14px 12px 10px; }
  .manufacturing-cost-import-header p { font-size: 11px; }
  .manufacturing-cost-import-source { padding: 10px 12px 6px; }
  .manufacturing-cost-import-dropzone { min-height: 170px; padding: 18px 12px; }
  .manufacturing-cost-import-dropzone strong { font-size: 14px; }
  .manufacturing-cost-import-dropzone.has-file { grid-template-columns: 30px minmax(0, 1fr); padding: 10px; }
  .manufacturing-cost-import-dropzone.has-file img { width: 30px; height: 30px; }
  .manufacturing-cost-import-dropzone.has-file .btn-primary, .manufacturing-cost-import-dropzone.has-file small { grid-column: 1 / -1; }
  .manufacturing-cost-import-source small { text-align: left; }
  .manufacturing-cost-import-status { margin: 0 12px 6px; }
  .manufacturing-cost-import-config { padding: 0 12px 10px; }
  .manufacturing-cost-import-controls { grid-template-columns: 1fr; }
  .manufacturing-cost-import-preview-head { grid-template-columns: 1fr; }
  .manufacturing-cost-import-preview-head > div { justify-content: flex-start; }
  .manufacturing-cost-import-preview { max-height: 38vh; }
  .manufacturing-cost-import-footer { padding: 10px 12px 12px; }
  .manufacturing-cost-target-grid, .manufacturing-cost-addition-grid { grid-template-columns: 1fr; }
  .manufacturing-cost-category-core-list { grid-template-columns: 1fr; }
  .manufacturing-cost-flow-head { align-items: flex-start; flex-wrap: wrap; }
  .manufacturing-cost-flow-note { margin-left: 0; white-space: normal; width: 100%; }
  .manufacturing-cost-listbar .manufacturing-cost-field { grid-column: auto; }
  .manufacturing-cost-candidate-head { align-items: stretch; flex-direction: column; }
  .manufacturing-cost-candidate-actions { justify-content: flex-start; }
  .manufacturing-cost-import-unregistered { grid-template-columns: 1fr; }
  .manufacturing-cost-candidate-row { grid-template-columns: 26px minmax(0, 1fr); }
  .manufacturing-cost-candidate-side { grid-column: 2; justify-content: flex-start; }
  .manufacturing-cost-section-head { align-items: stretch; flex-direction: column; }
  .manufacturing-cost-component-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manufacturing-cost-component-title, .manufacturing-cost-component-part { grid-column: 1 / -1; }
  .manufacturing-cost-main-row { grid-template-columns: minmax(0, 1fr); }
  .manufacturing-cost-target-delete-card { width: calc(100vw - 12px); max-height: calc(100vh - 12px); margin: 6px; padding: 16px 12px; }
  .manufacturing-cost-target-delete-toolbar { flex-wrap: wrap; }
  .manufacturing-cost-target-delete-count { flex-basis: 100%; margin-left: 0; }
  .manufacturing-cost-target-delete-row { grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 9px 10px; }
  .manufacturing-cost-target-delete-amount { grid-column: 2; margin-top: -2px; }
  .manufacturing-cost-target-delete-card .form-footer { display: grid; grid-template-columns: 1fr 1.5fr; }
}
@media(max-width:760px){
  #screen-purchase-mgmt .mgmt-body { padding: 12px 8px; }
  #screen-purchase-mgmt .mgmt-toolbar { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: stretch; }
  #screen-purchase-mgmt .mgmt-search { grid-column: 1 / -1; min-width: 0; }
  #screen-purchase-mgmt .btn-primary { width: 100%; }
  .purchase-mgmt-table-wrap { overflow-x: auto; }
  .purchase-mgmt-table { min-width: 760px; }
}
#screen-core-list-mgmt .mgmt-body { max-width: none; }
.core-list-mode-switch { display: inline-flex; gap: 2px; margin-bottom: 10px; padding: 3px; border: 1px solid #cfd7e6; border-radius: 6px; background: #e9eef5; }
.core-list-mode-btn { min-width: 120px; border: 0; border-radius: 4px; padding: 8px 14px; background: transparent; color: #4b5563; font-weight: 800; cursor: pointer; }
.core-list-mode-btn.active { background: #fff; color: #1857a4; box-shadow: 0 1px 3px rgba(19, 43, 76, 0.16); }
.core-list-collection-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 170px 145px 140px auto auto auto auto; gap: 8px; align-items: stretch; }
.core-list-collection-toolbar .form-select { width: 100%; min-width: 0; }
.core-list-inventory-toolbar.hidden,
.core-list-collection-toolbar.hidden { display: none !important; }
#core-list-list { overflow-x: visible; }
#core-list-list .mgmt-table { min-width: 0; table-layout: fixed; }
#core-list-list .mgmt-table th,
#core-list-list .mgmt-table td { white-space: nowrap; padding: 8px 10px; }
#core-list-list .mgmt-pn { white-space: nowrap; }
#core-list-list .mgmt-table th:nth-child(6),
#core-list-list .mgmt-table td:nth-child(6) { white-space: normal; }
#core-list-list .mgmt-table th:nth-child(1),
#core-list-list .mgmt-table td:nth-child(1) { width: 17%; }
#core-list-list .mgmt-table th:nth-child(2),
#core-list-list .mgmt-table td:nth-child(2) { width: 12%; }
#core-list-list .mgmt-table th:nth-child(3),
#core-list-list .mgmt-table td:nth-child(3) { width: 24%; }
#core-list-list .mgmt-table th:nth-child(4),
#core-list-list .mgmt-table td:nth-child(4) { width: 7%; text-align: right; }
#core-list-list .mgmt-table th:nth-child(5),
#core-list-list .mgmt-table td:nth-child(5) { width: 8%; }
#core-list-list .mgmt-table th:nth-child(6),
#core-list-list .mgmt-table td:nth-child(6) { width: auto; }
#core-list-list .mgmt-table th:nth-child(7),
#core-list-list .mgmt-table td:nth-child(7) { width: 220px; text-align: right; }
#core-list-list .mgmt-actions { justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
.core-list-table .core-main-pn { font-family: monospace; font-size: 13px; font-weight: 800; color: #173b6d; }
.core-list-table .core-maker-badge { display: inline-flex; align-items: center; max-width: 140px; padding: 3px 8px; border-radius: 999px; background: #f0f6ff; color: #245aa8; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.core-list-table .core-qty-pill { display: inline-flex; justify-content: flex-end; min-width: 42px; padding: 3px 8px; border-radius: 6px; background: #eef7ee; color: #1f7a35; font-weight: 800; font-variant-numeric: tabular-nums; }
.core-list-table .core-note { color: #4b5563; line-height: 1.45; }
.core-list-mobile-cards { display: none; }
.core-list-card { background: #fff; border: 1px solid #e3e9f3; border-radius: 10px; padding: 11px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.core-list-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #edf0f5; }
.core-list-card .core-qty-pill { display: inline-flex; justify-content: flex-end; min-width: 42px; padding: 3px 8px; border-radius: 6px; background: #eef7ee; color: #1f7a35; font-weight: 800; font-variant-numeric: tabular-nums; }
.core-list-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; padding: 9px 0; }
.core-list-card-field { min-width: 0; }
.core-list-card-label { display: block; color: #667085; font-size: 11px; font-weight: 800; margin-bottom: 3px; }
.core-list-card-value { min-width: 0; color: #1a1a2e; font-size: 13px; line-height: 1.4; word-break: break-word; }
.core-list-card-note { padding: 8px 0; border-top: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5; }
.core-list-card-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)); gap: 7px; padding-top: 9px; }
.core-list-card-actions button { width: 100%; min-height: 32px; padding: 6px 5px; }
.core-count-pill.stock { background: #e7f5ed; color: #17643b; }
.core-count-pill.shortage { background: #fff0ed; color: #a33a2c; }
.core-collection-table { min-width: 1050px !important; }
#core-list-list .core-collection-table th,
#core-list-list .core-collection-table td { white-space: normal; vertical-align: middle; }
#core-list-list .core-collection-table th:nth-child(1),
#core-list-list .core-collection-table td:nth-child(1) { width: 92px; text-align: center; }
#core-list-list .core-collection-table th:nth-child(2),
#core-list-list .core-collection-table td:nth-child(2) { width: 210px; }
#core-list-list .core-collection-table th:nth-child(3),
#core-list-list .core-collection-table td:nth-child(3) { width: 135px; }
#core-list-list .core-collection-table th:nth-child(4),
#core-list-list .core-collection-table td:nth-child(4) { width: 150px; text-align: left; }
#core-list-list .core-collection-table th:nth-child(5),
#core-list-list .core-collection-table td:nth-child(5),
#core-list-list .core-collection-table th:nth-child(6),
#core-list-list .core-collection-table td:nth-child(6) { width: 70px; text-align: center; }
#core-list-list .core-collection-table th:nth-child(7),
#core-list-list .core-collection-table td:nth-child(7) { width: auto; text-align: left; }
#core-list-list .core-collection-table th:nth-child(8),
#core-list-list .core-collection-table td:nth-child(8) { width: 190px; text-align: right; }
.core-collection-rank-badge,
.core-status-badge,
.core-stock-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 3px 8px; border-radius: 5px; font-size: 12px; font-weight: 800; line-height: 1.2; }
.core-category-rank { display: grid; justify-items: center; gap: 1px; margin-bottom: 5px; line-height: 1.2; }
.core-category-rank span { color: #667085; font-size: 10px; font-weight: 800; }
.core-category-rank strong { color: #173b6d; font-size: 15px; font-variant-numeric: tabular-nums; }
.core-status-badge.collecting { background: #e8f0ff; color: #245aa8; }
.core-status-badge.completed { background: #e5f5e9; color: #23743a; }
.core-status-badge.paused { background: #f0f1f3; color: #5d6673; }
.core-stock-badge.has-stock { background: #e5f5e9; color: #23743a; }
.core-stock-badge.no-stock { background: #fde9e6; color: #aa3529; }
.core-qty-pill.target { background: #e8f0ff; color: #245aa8; }
.core-shortage-value { display: inline-flex; min-width: 38px; justify-content: center; padding: 4px 7px; border-radius: 5px; font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
.core-shortage-value.needed { background: #fde9e6; color: #aa3529; }
.core-shortage-value.enough { background: #e5f5e9; color: #23743a; }
.core-collection-table .core-main-pn,
.core-collection-card .core-main-pn { font-family: monospace; font-size: 14px; font-weight: 900; color: #173b6d; overflow-wrap: anywhere; }
.core-collection-table .core-note { margin-top: 5px; color: #303846; line-height: 1.35; }
.core-collection-mobile-cards { display: grid; gap: 10px; }
.core-collection-card { padding: 11px; border: 1px solid #dce4ef; border-radius: 8px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.core-collection-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #edf0f5; }
.core-collection-card-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.core-collection-qty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #e0e6ef; border-radius: 6px; overflow: hidden; }
.core-collection-qty-grid > div { display: grid; place-items: center; gap: 2px; padding: 7px 4px; border-right: 1px solid #e0e6ef; }
.core-collection-qty-grid > div:last-child { border-right: 0; }
.core-collection-qty-grid > div > span:not(.core-stock-badge) { font-size: 10px; font-weight: 800; color: #667085; }
.core-collection-qty-grid strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.core-collection-qty-grid .shortage strong { color: #aa3529; }
.core-collection-meta { padding: 8px 0; color: #596579; font-size: 12px; line-height: 1.5; }
.core-collection-note { padding: 8px 0; border-top: 1px solid #edf0f5; color: #374151; font-size: 12px; line-height: 1.55; }
.core-collection-form-card { width: min(720px, calc(100vw - 24px)); }
.core-collection-selected-product { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 16px; margin-bottom: 12px; padding: 10px 12px; border-left: 3px solid #2f72c9; background: #eef5fd; color: #34445a; }
.core-collection-selected-product:empty { display: none; }
.core-collection-selected-product strong { grid-column: 1 / -1; color: #173b6d; font-family: monospace; font-size: 15px; }
.core-collection-selected-product span { font-size: 12px; }
.core-collection-selected-product { overflow-wrap: anywhere; }
#ccf-product-candidates { overflow-wrap: anywhere; }
.core-classification-pages { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 6px; }
#ccf-product-candidates .candidate-empty { display: grid; gap: 3px; padding: 12px; color: #667085; font-size: 12px; }
.core-collection-candidate-item strong { color: #172033; font-family: monospace; font-size: 14px; }
.core-collection-candidate-item small { display: block; margin-top: 4px; color: #667085; line-height: 1.45; }
@media (max-width: 767px) {
  #screen-core-list-mgmt .page-header { align-items: flex-start; flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  #screen-core-list-mgmt .page-header-left { min-width: 0; flex: 1 1 auto; }
  #screen-core-list-mgmt .page-header-right { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  #screen-core-list-mgmt .logo-text { font-size: 15px; }
  #screen-core-list-mgmt .mgmt-body { padding: 12px 8px; overflow-x: hidden; }
  #screen-core-list-mgmt .mgmt-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: stretch; }
  #screen-core-list-mgmt .core-list-collection-toolbar { grid-template-columns: 1fr 1fr; }
  #screen-core-list-mgmt .core-list-collection-toolbar .mgmt-search,
  #screen-core-list-mgmt .core-list-collection-toolbar #btn-create-core-list-from-ranking,
  #screen-core-list-mgmt .core-list-collection-toolbar #btn-export-core-collection { grid-column: 1 / -1; }
  .core-list-mode-switch { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .core-list-mode-btn { min-width: 0; width: 100%; }
  #screen-core-list-mgmt .mgmt-search { grid-column: 1 / -1; min-width: 0; width: 100%; }
  #screen-core-list-mgmt .mgmt-toolbar .btn-primary,
  #screen-core-list-mgmt .mgmt-toolbar .btn-sm-edit { width: 100%; min-height: 38px; padding: 8px 10px; font-size: 12px; }
  #screen-core-list-mgmt #btn-create-core-list-from-ranking { grid-column: 1 / -1; }
  #core-list-list { overflow-x: hidden; }
  #core-list-list .mgmt-table,
  #core-list-list .mgmt-table tbody,
  #core-list-list .mgmt-table tr,
  #core-list-list .mgmt-table td { display: block; width: 100%; }
  #core-list-list .mgmt-table { background: transparent; box-shadow: none; border-radius: 0; table-layout: auto; }
  #core-list-list .mgmt-table tr:first-child { display: none; }
  #core-list-list .mgmt-table tr { margin: 0 0 10px; padding: 10px; border: 1px solid #e3e9f3; border-radius: 10px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
  #core-list-list .mgmt-table tr:hover td { background: transparent; }
  #core-list-list .mgmt-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 0; border-bottom: 1px solid #f0f2f5; white-space: normal; text-align: left !important; }
  #core-list-list .mgmt-table td:last-child { border-bottom: 0; grid-template-columns: 1fr; padding-bottom: 0; }
  #core-list-list .mgmt-table td::before { color: #667085; font-size: 11px; font-weight: 800; line-height: 1.4; }
  #core-list-list .mgmt-table td:nth-child(1)::before { content: "コア品番"; }
  #core-list-list .mgmt-table td:nth-child(2)::before { content: "メーカー"; }
  #core-list-list .mgmt-table td:nth-child(3)::before { content: "純正品番"; }
  #core-list-list .mgmt-table td:nth-child(4)::before { content: "メーカー品番"; }
  #core-list-list .mgmt-table td:nth-child(5)::before { content: "数量"; }
  #core-list-list .mgmt-table td:nth-child(6)::before { content: "置き場"; }
  #core-list-list .mgmt-table td:nth-child(7)::before { content: "メモ"; }
  #core-list-list .mgmt-table td:nth-child(8)::before { content: ""; display: none; }
  #core-list-list .mgmt-pn,
  #core-list-list .core-main-pn { white-space: normal; overflow-wrap: anywhere; }
  #core-list-list .core-maker-badge { max-width: 100%; white-space: normal; }
  #core-list-list .mgmt-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; justify-content: stretch; }
  #core-list-list .mgmt-actions button { width: 100%; min-height: 34px; padding: 7px 6px; }
  #core-list-list .core-list-mobile-cards { display: grid; gap: 10px; }
  #core-list-list .core-list-mobile-cards .core-maker-badge { max-width: 100%; white-space: nowrap; }
  .core-collection-selected-product { grid-template-columns: 1fr; }
}
.stock-mgmt-body { max-width: 1360px; }
#btn-container-stock-open { min-height: 36px; white-space: nowrap; }
#btn-container-stock-open[hidden] { display: none; }
@media (max-width: 600px) {
  #screen-container-stock-mgmt .page-header-left { flex: 1 1 100%; flex-wrap: wrap; min-width: 0; row-gap: 8px; }
  #screen-container-stock-mgmt .back-btn { flex: 0 0 auto; white-space: nowrap; }
  #screen-container-stock-mgmt .logo-text { flex: 1 1 160px; white-space: normal; }
}

.container-stock-card { margin: 0 0 18px; padding: 18px; border: 1px solid #dbe4ef; border-radius: 12px; background: #fff; box-shadow: 0 1px 5px rgba(17, 35, 60, .05); }
.container-stock-card[hidden], .container-stock-history[hidden] { display: none; }
.container-stock-held-panel[hidden] { display: none; }
.container-stock-held-panel { margin: 14px 0; padding: 16px; border: 1px solid #e7c780; border-radius: 10px; background: #fffaf0; }
.container-stock-held-panel h3 { margin: 0; }
.container-stock-held-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eadfcb; }
.container-stock-held-item > div { min-width: 0; }
.container-stock-held-item small { display: block; color: #617187; margin-top: 4px; }
.container-stock-held-item p { overflow-wrap: anywhere; margin: 6px 0; font-size: 13px; }
.container-stock-held-item button { flex-shrink: 0; }
.container-stock-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.container-stock-hold-reason { display: grid; gap: 5px; margin-top: 9px; color: #785117; font-size: 12px; }
.container-stock-held-badge { color: #785117; background: #fff2ce; padding: 3px 6px; border-radius: 5px; }
.container-stock-family-confirm { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid #c9dbfa; border-radius: 6px; background: #edf4ff; color: #143b6b; line-height: 1.5; white-space: normal; }
.container-stock-family-confirm input { flex: 0 0 auto; margin-top: 4px; }
.container-stock-received { color: #147345; }
@media (max-width: 640px) { .container-stock-head, .container-stock-held-item { flex-direction: column; align-items: stretch; } }
.container-stock-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.container-stock-head h2 { margin: 0 0 4px; font-size: 17px; color: #1a2b40; }
.container-stock-head p { margin: 0; font-size: 12px; color: #617187; }
.container-stock-warning { margin: 12px 0; padding: 9px 11px; border-radius: 7px; background: #fff8e8; color: #7b551c; font-size: 12px; line-height: 1.55; }
.container-stock-inputs { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.container-stock-inputs > label { display: grid; gap: 5px; min-width: min(100%, 260px); color: #3e4f64; font-size: 12px; font-weight: 700; }
.container-stock-inputs .form-input { width: 100%; }
.container-stock-file-control { display: flex; align-items: center; gap: 8px; min-width: 0; }
.container-stock-file-control span { font-size: 12px; color: #52647b; overflow-wrap: anywhere; }
.container-stock-inputs > .container-stock-cost-list-label { min-width: min(100%, 280px); }
.container-stock-cost-list-note { width: 100%; margin: -3px 0 0; color: #52647b; font-size: 12px; line-height: 1.5; }
.container-stock-status { margin: 10px 0 0; font-size: 12px; color: #375f43; line-height: 1.55; }
.container-stock-status.is-error { color: #b42318; }
.container-stock-sheets { display: grid; gap: 8px; margin-top: 12px; }
.container-stock-sheet { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f9fbfe; }
.container-stock-sheet label { display: grid; gap: 4px; font-size: 11px; color: #52647b; }
.container-stock-sheet .container-stock-sheet-check { display: flex; align-items: center; gap: 6px; min-width: 120px; font-weight: 700; font-size: 13px; color: #24364a; }
.container-stock-sheet-summary { align-self: center; font-size: 12px; color: #52647b; }
.container-stock-sheet select { min-width: 120px; max-width: 180px; }
.container-stock-sheet input[type='number'] { width: 76px; }
.container-stock-results { margin-top: 12px; }
.container-stock-cost-products { min-width: 0; margin-top: 16px; }
.container-stock-cost-products h3 { margin: 3px 0 0; font-size: 18px; color: var(--dcats-ink); overflow-wrap: anywhere; }
.container-stock-cost-products > p { margin: 0 0 10px; font-size: 12px; color: #52647b; line-height: 1.6; }
.container-stock-list-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.container-stock-list-heading p { color: #52647b; font-size: 11px; }
.container-stock-source-badge { padding: 6px 10px; border-radius: 6px; background: #edf4fb; color: #204568; font-size: 12px; font-weight: 700; }
.container-stock-list-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0 0 14px; }
.container-stock-list-stats > div { padding: 12px 14px; border: 1px solid #dce4ed; border-radius: 8px; background: #f8fafc; }
.container-stock-list-stats dt { color: #52647b; font-size: 11px; line-height: 1.5; }
.container-stock-list-stats dd { margin-top: 5px; font-size: 24px; font-weight: 750; color: var(--dcats-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.container-stock-list-stats small { margin-left: 4px; color: #52647b; font-size: 12px; font-weight: 500; }
.container-stock-cost-products > .container-stock-quantity-notice { padding: 9px 12px; background: #fff8e9; border-radius: 6px; color: #765516; }
.container-stock-cost-products .container-stock-cost-table { min-width: 920px; table-layout: fixed; font-size: 13px; overflow: visible; border-collapse: separate; border-spacing: 0; box-shadow: none; }
.container-stock-cost-table td, .container-stock-cost-table th { overflow-wrap: anywhere; }
.container-stock-cost-table td { padding: 13px 12px; color: #52647b; }
.container-stock-cost-table th { position: sticky; top: 0; z-index: 2; background: #edf2f7; }
.container-stock-cost-table td:first-child, .container-stock-cost-table th:first-child { position: sticky; left: 0; width: 160px; z-index: 1; background: #fff; color: var(--dcats-ink); font-weight: 650; }
.container-stock-cost-table th:first-child { z-index: 3; background: #edf2f7; }
.container-stock-cost-table .container-stock-cost-quantity { width: 104px; text-align: right; font-size: 14px; font-weight: 750; color: var(--dcats-ink); font-variant-numeric: tabular-nums; background: #f2f7fc; }
.container-stock-cost-table th.container-stock-cost-quantity { font-size: 12px; }
.container-stock-cost-table tbody tr:hover td { background: #edf4fb; }
@media (max-width: 600px) {
  .container-stock-list-stats { gap: 6px; }
  .container-stock-list-stats > div { padding: 9px 8px; }
  .container-stock-list-stats dd { font-size: 21px; }
  .container-stock-list-stats dt { font-size: 10px; }
}
.container-stock-result-state { display: grid; gap: 4px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid #d9e4ef; border-radius: 9px; background: #f5f9fd; color: #1c4265; line-height: 1.5; }
.container-stock-result-state strong { font-size: 15px; }
.container-stock-result-state p { margin: 0; font-size: 12px; }
.container-stock-result-state.is-ready, .container-stock-result-state.is-applied { border-color: #98d6b4; background: #eefaf3; color: #155f3c; }
.container-stock-result-state.is-attention { border-color: #ebc976; background: #fff9e9; color: #745000; }
.container-stock-result-state.is-duplicate { border-color: #f0aaa4; background: #fff5f4; color: #a22b21; }
.container-stock-summary { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.container-stock-cost-summary { margin: 0 0 10px; padding: 8px 10px; border-radius: 7px; background: #eef5ff; color: #23436c; font-size: 12px; font-weight: 700; }
.container-stock-duplicate, .container-stock-unresolved { color: #b42318; }
.container-stock-choice { display: block; margin-bottom: 5px; color: #9a5b00; font-weight: 700; }
.container-stock-resolution-notice { margin: 0 0 10px; padding: 9px 11px; border: 1px solid #f5c6c1; border-radius: 7px; background: #fff6f5; color: #9d271f; font-size: 12px; }
.container-stock-error-row td { background: #fff9f8; }
.container-stock-fix-button { display: block; margin-top: 5px; padding: 2px 0; border: 0; background: none; color: #1765ad; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.container-stock-fix-button:focus-visible { outline: 2px solid #1765ad; outline-offset: 2px; }
.container-stock-resolver { margin: 0 0 12px; padding: 12px; border: 1px solid #9bc3ec; border-radius: 8px; background: #f7fbff; font-size: 12px; }
.container-stock-resolver-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.container-stock-resolver-head strong { display: block; font-size: 14px; color: #19334c; }
.container-stock-resolver-head small { display: block; margin-top: 3px; color: #667085; }
.container-stock-resolver p { margin: 9px 0; line-height: 1.5; }
.container-stock-resolver-fields, .container-stock-resolver-search { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 10px 0; }
.container-stock-resolver-fields label, .container-stock-resolver-search label { display: grid; gap: 5px; flex: 1 1 260px; color: #3e4f64; font-weight: 700; }
.container-stock-resolver-fields button, .container-stock-resolver-search button { min-height: 36px; }
.container-stock-resolver-hint { color: #667085; }
.container-stock-product-results { display: grid; gap: 6px; margin: 10px 0; max-height: 250px; overflow-y: auto; }
.container-stock-product-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px; border: 1px solid #dce8f4; border-radius: 6px; background: #fff; }
.container-stock-product-result > div { flex: 1 1 220px; min-width: 0; }
.container-stock-product-result strong, .container-stock-product-result small { display: block; overflow-wrap: anywhere; }
.container-stock-product-result small { margin-top: 3px; color: #667085; }
.container-stock-table-wrap { max-height: 440px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.container-stock-table { width: 100%; min-width: 840px; margin: 0; font-size: 12px; }
.container-stock-table td { vertical-align: middle; }
.container-stock-table td:first-child > strong { white-space: nowrap; }
.container-stock-table td:first-child small { display: block; color: #667085; margin-top: 3px; }
.container-stock-table select { width: 100%; min-width: 245px; font-size: 12px; }
.container-stock-table .container-stock-source { color: #667085; max-width: 180px; overflow-wrap: anywhere; }
.container-stock-footer { display: flex; justify-content: flex-end; margin-top: 12px; }
.container-stock-confirm { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 1px solid #dce4ef; border-radius: 16px; background: #fff; color: #19334c; box-shadow: 0 24px 80px #12233e40; }
.container-stock-confirm::backdrop { background: #101b32a6; }
.container-stock-confirm form { padding: 28px; }
.container-stock-confirm h2 { margin: 0; font-size: 24px; line-height: 1.4; }
.container-stock-confirm p { font-size: 15px; line-height: 1.75; }
.container-stock-confirm-eyebrow { margin: 0 0 6px; color: #617087; font-size: 12px !important; font-weight: 650; }
.container-stock-confirm-source { display: grid; gap: 4px; margin: 18px 0; padding: 12px 14px; border: 1px solid #e1e7ef; border-radius: 8px; background: #f8fafc; overflow-wrap: anywhere; }
.container-stock-confirm-source span { color: #596b80; font-size: 12px; }
.container-stock-confirm-totals { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin: 20px 0; }
.container-stock-confirm-totals > div { min-width: 0; padding: 16px; border: 1px solid #dce6f1; border-radius: 10px; background: #f0f6fc; }
.container-stock-confirm-totals dt { color: #405c78; font-size: 14px; }
.container-stock-confirm-totals dd { margin: 8px 0 0; font-size: 36px; line-height: 1.2; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.container-stock-confirm-totals small { margin-left: 6px; font-size: 15px; font-weight: 500; }
.container-stock-confirm-held { margin: 18px 0; padding: 14px 16px; border: 1px solid #ecd7a4; border-radius: 10px; background: #fff9ed; color: #72521c; }
.container-stock-confirm-held h3 { margin: 0; font-size: 15px; }
.container-stock-confirm-held p { margin: 6px 0 0; }
.container-stock-confirm-note { color: #52647b; }
.container-stock-confirm footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #e5eaf0; }
.container-stock-confirm footer button { min-height: 46px; padding: 10px 18px; font-size: 15px; line-height: 1.5; }
.container-stock-confirm .btn-secondary { border: 1px solid #becbd9; border-radius: 8px; background: #fff; color: #344c65; font-weight: 650; cursor: pointer; }
.container-stock-confirm .btn-secondary:hover { background: #f1f5f9; }
.container-stock-confirm button:focus-visible { outline: 3px solid #337cca; outline-offset: 3px; }
@media (max-width: 600px) {
  .container-stock-confirm form { padding: 22px 18px; }
  .container-stock-confirm-totals { grid-template-columns: 1fr 1fr; gap: 8px; }
  .container-stock-confirm-totals > div { padding: 12px; }
  .container-stock-confirm-totals dd { font-size: 30px; }
  .container-stock-confirm footer { flex-direction: column-reverse; }
  .container-stock-confirm footer button { width: 100%; }
}
.container-stock-history { margin-top: 12px; padding: 12px; border-radius: 8px; background: #f7f9fc; font-size: 12px; color: #344054; }
.container-stock-history h3 { margin: 0 0 6px; font-size: 13px; }
.container-stock-history ul { margin: 0; padding-left: 20px; line-height: 1.7; }
.container-stock-card button:disabled { opacity: .52; cursor: not-allowed; }
.stock-mgmt-toolbar { align-items: stretch; }
.stock-mgmt-toolbar .form-select { min-width: 150px; max-width: 210px; }
.stock-mgmt-table-wrap { overflow-x: auto; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); background: #fff; }
.stock-mgmt-table { min-width: 1460px; box-shadow: none; border-radius: 0; table-layout: fixed; }
.stock-mgmt-table th:nth-child(1), .stock-mgmt-table td:nth-child(1) { width: 12%; }
.stock-mgmt-table th:nth-child(2), .stock-mgmt-table td:nth-child(2) { width: 12%; }
.stock-mgmt-table th:nth-child(3), .stock-mgmt-table td:nth-child(3) { width: 7%; }
.stock-mgmt-table th:nth-child(4), .stock-mgmt-table td:nth-child(4) { width: 9%; }
.stock-mgmt-table th:nth-child(5), .stock-mgmt-table td:nth-child(5) { width: 6%; }
.stock-mgmt-table th:nth-child(6), .stock-mgmt-table td:nth-child(6) { width: 7%; }
.stock-mgmt-table th:nth-child(7), .stock-mgmt-table td:nth-child(7) { width: 8%; }
.stock-mgmt-table th:nth-child(8), .stock-mgmt-table td:nth-child(8) { width: 7%; }
.stock-mgmt-table th:nth-child(9), .stock-mgmt-table td:nth-child(9) { width: 8%; }
.stock-mgmt-table th:nth-child(10), .stock-mgmt-table td:nth-child(10) { width: 8%; }
.stock-mgmt-table th:nth-child(11), .stock-mgmt-table td:nth-child(11) { width: 16%; }
.stock-mgmt-table th:last-child, .stock-mgmt-table td:last-child { width: 16%; }
.stock-mgmt-row.dirty td { background: #fffaf0; }
.stock-mgmt-kind { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stock-mgmt-input { width: 100%; min-width: 0; border: 1px solid #d7dce5; border-radius: 6px; padding: 6px 7px; font-size: 12px; background: #fff; }
.stock-mgmt-input:focus { border-color: #4f8ef7; outline: none; box-shadow: 0 0 0 2px rgba(79,142,247,.12); }
.stock-mgmt-qty { max-width: 86px; }
.stock-mgmt-actions { display: flex; gap: 4px; justify-content: flex-start; align-items: center; flex-wrap: nowrap; min-width: 0; }
.stock-mgmt-actions .btn-sm-edit { display: inline-flex; align-items: center; justify-content: center; height: 24px; min-height: 24px; padding: 0 6px; border-radius: 5px; font-size: 11px; line-height: 1; }
.stock-mgmt-add-kind { display: inline-flex; gap: 4px; align-items: center; flex-wrap: nowrap; min-width: 0; }
.stock-mgmt-add-kind select { height: 24px; max-width: 96px; border: 1px solid #d7dce5; border-radius: 5px; padding: 0 5px; font-size: 11px; background: #fff; }
.stock-mgmt-save-note { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: #fff4e5; color: #9a5b00; font-size: 11px; font-weight: 700; }
.stock-history-panel { margin-top: 14px; background: #fff; border: 1px solid #e5eaf2; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); overflow: hidden; }
.stock-history-panel.empty { padding: 14px; color: #98a2b3; font-size: 12px; }
.stock-history-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #eef1f6; background: #fbfcff; }
.stock-history-title { font-size: 14px; font-weight: 800; color: #1a1a2e; }
.stock-history-sub { font-size: 11px; color: #778095; margin-top: 3px; line-height: 1.5; }
.stock-history-current { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; font-size: 12px; color: #344054; }
.stock-history-current span { border: 1px solid #dbe4f0; border-radius: 999px; padding: 3px 8px; background: #fff; font-weight: 700; }
.stock-history-form { display: grid; grid-template-columns: minmax(140px, 180px) minmax(100px, 130px) minmax(220px, 1fr) auto; gap: 8px; align-items: end; padding: 12px 14px; border-bottom: 1px solid #eef1f6; }
.stock-history-form label { display: block; font-size: 11px; color: #667085; margin-bottom: 4px; }
.stock-history-form select, .stock-history-form input { width: 100%; border: 1px solid #d7dce5; border-radius: 6px; padding: 7px 8px; font-size: 12px; background: #fff; }
.stock-history-table-wrap { overflow-x: auto; }
.stock-history-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 12px; }
.stock-history-table th { background: #f7f9fc; color: #566174; font-weight: 700; padding: 8px 10px; text-align: left; border-bottom: 1px solid #e8edf5; }
.stock-history-table td { padding: 8px 10px; border-bottom: 1px solid #f0f2f6; vertical-align: top; }
.stock-history-delta.plus { color: #188344; font-weight: 800; }
.stock-history-delta.minus { color: #d92d20; font-weight: 800; }
@media (max-width: 767px) {
  .stock-mgmt-body { padding: 14px 8px; }
  .container-stock-card { padding: 12px; }
  .container-stock-head { align-items: flex-start; }
  .container-stock-head .btn-secondary { flex: 0 0 auto; }
  .container-stock-inputs > label, .container-stock-file-control, .container-stock-inputs > button { width: 100%; }
  .container-stock-file-control { flex-wrap: wrap; }
  .container-stock-sheet label { flex: 1 1 115px; }
  .container-stock-sheet select { max-width: none; width: 100%; }
  .container-stock-resolver-fields button, .container-stock-resolver-search button { width: 100%; }
  .container-stock-product-result button { flex: 1 1 130px; }
  .stock-mgmt-toolbar .form-select { max-width: none; flex: 1 1 140px; }
  .stock-mgmt-table { min-width: 960px; font-size: 12px; }
  .stock-history-form { grid-template-columns: 1fr 1fr; }
  .stock-history-form .stock-history-note-field { grid-column: 1 / -1; }
}
.customer-access-body { flex: 1; padding: 20px 16px; max-width: 1220px; width: 100%; margin: 0 auto; overflow-y: auto; }
.customer-access-layout { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
.customer-access-panel { background: #fff; border: 1px solid #e4e7ee; border-radius: 10px; overflow: hidden; }
.customer-access-panel-head { min-height: 44px; padding: 11px 14px; border-bottom: 1px solid #edf0f5; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.customer-access-panel-title { font-size: 14px; font-weight: 800; color: #1a1a2e; }
.customer-access-save-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-bottom: 1px solid #dce4ee; background: #f7f9fc; box-shadow: 0 2px 6px rgba(26,42,70,.06); }
.customer-access-save-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.customer-access-save-copy strong { color: #36506d; font-size: 13px; line-height: 1.4; }
.customer-access-save-copy span { color: #667085; font-size: 11px; line-height: 1.5; }
.customer-access-save-bar.unsaved { border-bottom-color: #efb45a; background: #fff7e8; box-shadow: 0 2px 8px rgba(154,91,0,.12); }
.customer-access-save-bar.unsaved .customer-access-save-copy strong { color: #9a5b00; font-size: 14px; }
.customer-access-save-btn { min-height: 44px; padding: 10px 18px; font-size: 14px; flex: 0 0 auto; }
.customer-access-save-btn:disabled { background: #c6ced9; color: #fff; cursor: not-allowed; opacity: 1; }
.customer-access-list { max-height: calc(100vh - 230px); overflow: auto; }
.customer-access-row { width: 100%; border: none; background: #fff; border-bottom: 1px solid #f0f2f5; padding: 10px 12px; text-align: left; cursor: pointer; display: block; }
.customer-access-row:hover { background: #f8fbff; }
.customer-access-row.selected { background: #eef5ff; box-shadow: inset 3px 0 0 #4f8ef7; }
.customer-access-row.inactive { background: #fbfbfc; color: #9aa3b2; }
.customer-access-name { font-size: 13px; font-weight: 800; color: #1a1a2e; line-height: 1.4; }
.customer-access-row.inactive .customer-access-name { color: #7e8796; }
.customer-access-sub { font-size: 11px; color: #778095; line-height: 1.5; margin-top: 3px; word-break: break-word; }
.customer-access-detail { padding: 14px; }
.customer-access-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.customer-access-stat { border: 1px solid #e6ebf3; border-radius: 8px; padding: 8px 10px; background: #fbfcff; min-width: 0; }
.customer-access-stat-label { font-size: 11px; color: #778095; margin-bottom: 3px; }
.customer-access-stat-value { font-size: 13px; font-weight: 800; color: #1a1a2e; word-break: break-word; }
.customer-access-rank-select { width: 100%; border: 1px solid #d7dce5; border-radius: 7px; background: #fff; color: #1a1a2e; font-size: 13px; font-weight: 800; padding: 6px 8px; outline: none; }
.customer-access-rank-select:focus { border-color: #4f8ef7; box-shadow: 0 0 0 2px rgba(79,142,247,.12); }
.customer-access-filter-check { display: inline-flex; align-items: center; gap: 6px; color: #566174; font-size: 12px; white-space: nowrap; }
.customer-access-status { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 800; background: #eef8f1; color: #188344; }
.customer-access-status.inactive { background: #fff3e0; color: #9a5b00; }
.customer-access-management-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: -2px 0 14px; }
.customer-order-publication { min-width: 0; margin: 9px 0 14px; padding: 11px 12px; border: 1px solid #efb4aa; border-radius: 8px; background: #fff6f4; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.customer-order-publication.enabled { border-color: #7bc493; background: #eef9f1; }
.customer-order-publication-copy { min-width: 0; }
.customer-order-publication-copy strong { display: block; color: #9f2f25; font-size: 13px; line-height: 1.4; }
.customer-order-publication.enabled .customer-order-publication-copy strong { color: #18743a; }
.customer-order-publication-copy small { display: block; margin-top: 3px; color: #667085; font-size: 10px; line-height: 1.5; }
.customer-order-publication-control { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; }
.customer-order-publication-control input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.customer-order-publication-slider { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #aeb7c4; box-shadow: inset 0 0 0 1px rgba(27,39,55,.14); transition: background .16s ease; }
.customer-order-publication-slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(27,39,55,.25); transition: transform .16s ease; }
.customer-order-publication-control input:checked + .customer-order-publication-slider { background: #258348; }
.customer-order-publication-control input:checked + .customer-order-publication-slider::after { transform: translateX(20px); }
.customer-order-publication-control input:focus-visible + .customer-order-publication-slider { outline: 3px solid rgba(37,99,199,.28); outline-offset: 2px; }
.customer-order-publication-state { min-width: 44px; color: #9f2f25; font-size: 12px; font-weight: 800; text-align: center; white-space: nowrap; }
.customer-order-publication.enabled .customer-order-publication-state { color: #18743a; }
.detail-customer-section { margin-top: 12px; }
.detail-customer-panel { border: 1px solid #e5edf8; border-radius: 8px; background: #fbfdff; padding: 10px 12px; }
.detail-customer-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.detail-customer-head label { color: #667085; font-size: 12px; font-weight: 700; white-space: nowrap; }
.detail-customer-select { flex: 1; min-width: 220px; border: 1px solid #d7dce5; border-radius: 7px; background: #fff; padding: 7px 9px; font-size: 12px; }
.detail-customer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.detail-customer-cell { border-top: 1px solid #edf0f5; padding-top: 7px; min-width: 0; }
.detail-customer-label { color: #778095; font-size: 11px; margin-bottom: 3px; }
.detail-customer-value { color: #1a1a2e; font-size: 13px; font-weight: 800; word-break: break-word; }
.detail-customer-value.price { color: #1a8c3e; font-size: 16px; }
.detail-customer-note { color: #8a94a6; font-size: 11px; line-height: 1.45; margin-top: 8px; }
.detail-lower-grid { display: grid; grid-template-columns: minmax(350px, 1fr) minmax(340px, 1.3fr); gap: 12px; align-items: stretch; margin-top: 10px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.detail-lower-grid.detail-lower-count-1 { grid-template-columns: minmax(0, 1fr); }
.detail-lower-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.detail-lower-panel #kikan-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.detail-lower-panel .detail-customer-section { margin-top: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.detail-lower-panel .kikan-section-title,
.detail-lower-panel .price-section-title { margin-top: 0; flex: 0 0 auto; }
.detail-lower-panel #detail-customer-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.customer-setting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
.customer-hanbaiou-billing { margin: 10px 0 14px; padding: 11px 12px; border: 1px solid #d8e3f0; border-left: 4px solid #1f6fd1; border-radius: 8px; background: #f7faff; }
.customer-hanbaiou-billing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.customer-hanbaiou-billing-field { min-width: 0; display: grid; gap: 5px; }
.customer-hanbaiou-billing-field span { color: #405268; font-size: 11px; font-weight: 800; }
.customer-hanbaiou-billing-field input, .customer-hanbaiou-billing-field select { width: 100%; min-width: 0; height: 36px; box-sizing: border-box; border: 1px solid #bdcbe0; border-radius: 6px; padding: 0 9px; background: #fff; color: #15263b; font-size: 12px; outline: none; }
.customer-hanbaiou-billing-field input:focus, .customer-hanbaiou-billing-field select:focus { border-color: #1f6fd1; box-shadow: 0 0 0 2px rgba(31,111,209,.12); }
.customer-hanbaiou-billing-help { margin-top: 7px; color: #667085; font-size: 10px; line-height: 1.5; }
.customer-collection-summary { color: #1f6fd1; font-size: 12px; font-weight: 800; }
.customer-check { border: 1px solid #e6ebf3; border-radius: 8px; padding: 9px 10px; display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #334155; background: #fff; line-height: 1.45; }
.customer-check input { margin-top: 2px; flex: 0 0 auto; }
.customer-check.disabled { color: #9aa3b2; background: #f7f8fa; }
.customer-shipping-rule-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 8px; }
.customer-shipping-rule-option { min-width: 0; border: 1px solid #dce4ee; border-radius: 8px; padding: 10px; display: flex; align-items: flex-start; gap: 8px; background: #fff; cursor: pointer; }
.customer-shipping-rule-option:hover { border-color: #9eb8dc; }
.customer-shipping-rule-option input { margin-top: 2px; accent-color: #2563c7; flex: 0 0 auto; }
.customer-shipping-rule-option span { min-width: 0; }
.customer-shipping-rule-option strong { display: block; color: #26384d; font-size: 12px; line-height: 1.35; }
.customer-shipping-rule-option small { display: block; margin-top: 3px; color: #667085; font-size: 10px; line-height: 1.45; }
.customer-shipping-rule-option.separate:has(input:checked) { border-color: #d49a28; background: #fff8e6; }
.customer-shipping-rule-option.free:has(input:checked) { border-color: #4ca66a; background: #eef9f1; }
.customer-default-shipping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 8px; }
.customer-default-shipping-grid label { min-width: 0; border-left: 3px solid #287356; padding: 9px 10px; background: #f3f8f5; }
.customer-default-shipping-grid label:last-child { border-left-color: #b85a45; background: #fff5f2; }
.customer-default-shipping-grid span { display: block; margin-bottom: 5px; color: #405268; font-size: 11px; font-weight: 800; }
.customer-default-shipping-grid select { width: 100%; min-width: 0; height: 36px; border: 1px solid #c4cfca; border-radius: 5px; padding: 0 8px; background: #fff; color: #26384d; font-size: 11px; }
.customer-category-control { margin: 10px 0 16px; border: 1px solid #dce4ee; border-radius: 8px; overflow: hidden; background: #fff; }
.customer-category-toolbar { min-height: 42px; padding: 7px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #e7ecf3; background: #f7f9fc; }
.customer-category-toolbar > span { color: #405268; font-size: 12px; font-weight: 800; }
.customer-category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.customer-category-check { min-width: 0; min-height: 42px; padding: 9px 10px; display: flex; align-items: center; gap: 8px; border-right: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; color: #26384d; font-size: 12px; font-weight: 700; line-height: 1.35; cursor: pointer; }
.customer-category-check:hover { background: #f5f8fc; }
.customer-category-check input { flex: 0 0 auto; }
.customer-category-check span { min-width: 0; overflow-wrap: anywhere; }
.customer-rule-form { display: grid; grid-template-columns: 140px minmax(160px, 1fr) 110px minmax(150px, 1fr) auto; gap: 8px; align-items: end; margin: 10px 0 12px; }
.customer-rule-field label { display: block; color: #778095; font-size: 11px; margin-bottom: 4px; }
.customer-rule-field input, .customer-rule-field select { width: 100%; border: 1px solid #d7dce5; border-radius: 7px; padding: 7px 9px; font-size: 12px; outline: none; background: #fff; }
.customer-rule-field input:focus, .customer-rule-field select:focus { border-color: #4f8ef7; }
.customer-rule-candidates { border: 1px solid #e5e9f2; border-radius: 8px; overflow: hidden; margin: -4px 0 10px 148px; display: none; background: #fff; }
.customer-rule-candidate { width: 100%; border: none; border-bottom: 1px solid #f0f2f5; background: #fff; padding: 8px 10px; text-align: left; cursor: pointer; }
.customer-rule-candidate:last-child { border-bottom: none; }
.customer-rule-candidate:hover { background: #f5f8ff; }
.customer-rule-selected { color: #1a6fd4; font-size: 11px; margin: -4px 0 10px 148px; min-height: 16px; }
.customer-rule-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.customer-access-add-btn { min-height: 38px; margin-left: 4px; white-space: nowrap; }
.form-card.customer-register-card { width: min(860px, calc(100vw - 24px)); max-width: 860px; max-height: calc(100dvh - 24px); margin: 12px; padding: 0; overflow: auto; border-radius: 8px; }
.customer-register-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px 14px; border-bottom: 1px solid #dce4ee; background: #fff; }
.customer-register-header h3 { margin: 2px 0 3px; font-size: 19px; letter-spacing: 0; }
.customer-register-header p { margin: 0; color: #667085; font-size: 11px; line-height: 1.5; }
.customer-register-eyebrow { color: #a80b2f; font-size: 9px; font-weight: 900; letter-spacing: 0; }
.customer-register-close { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid #d5dce6; border-radius: 6px; background: #fff; color: #526174; font-size: 20px; line-height: 1; cursor: pointer; }
.customer-register-close:hover { border-color: #a80b2f; color: #a80b2f; }
.customer-register-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 20px 0; border-top: 1px solid #dfe5ed; border-bottom: 1px solid #dfe5ed; background: #f8fafc; }
.customer-register-flow span { min-width: 0; min-height: 48px; padding: 9px 12px; display: flex; align-items: center; gap: 8px; border-right: 1px solid #dfe5ed; }
.customer-register-flow span:last-child { border-right: 0; }
.customer-register-flow b { width: 24px; height: 24px; flex: 0 0 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #1f6fd1; color: #fff; font-size: 11px; }
.customer-register-flow em { min-width: 0; color: #31445a; font-size: 11px; font-style: normal; font-weight: 800; line-height: 1.4; }
.customer-register-confirm { margin: 12px 20px 0; min-height: 42px; padding: 9px 12px; display: flex; align-items: center; gap: 9px; border-left: 4px solid #d49a28; background: #fff8e6; color: #6d4c0f; font-size: 12px; font-weight: 800; line-height: 1.4; cursor: pointer; }
.customer-register-confirm input { flex: 0 0 auto; }
.customer-register-read-panel { margin: 12px 20px 0; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #cbddee; border-radius: 6px; background: #f3f8fd; color: #31445a; }
.customer-register-read-panel[hidden] { display: none; }
.customer-register-read-panel strong { font-size: 13px; }
.customer-register-read-panel p { margin: 4px 0 0; font-size: 12px; line-height: 1.5; }
.customer-register-read-panel button { flex: 0 0 auto; min-height: 40px; white-space: normal; }
@media (max-width: 600px) { .customer-register-read-panel { align-items: stretch; flex-direction: column; margin: 12px 14px 0; } }
.customer-register-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 14px 20px 4px; }
.customer-register-field { min-width: 0; display: grid; align-content: start; gap: 5px; }
.customer-register-field > span { color: #475467; font-size: 11px; font-weight: 800; line-height: 1.35; }
.customer-register-field > span b { margin-left: 4px; color: #c40031; font-size: 9px; }
.customer-register-field input, .customer-register-field select { width: 100%; min-width: 0; height: 38px; box-sizing: border-box; border: 1px solid #cfd7e2; border-radius: 6px; padding: 0 10px; background: #fff; color: #15263b; font-size: 13px; outline: none; }
.customer-register-field input:focus, .customer-register-field select:focus { border-color: #1f6fd1; box-shadow: 0 0 0 2px rgba(31,111,209,.12); }
.customer-register-field small { color: #667085; font-size: 9px; line-height: 1.45; }
.customer-register-field-code, .customer-register-field-address { grid-column: span 1; }
.customer-register-field-address2 { grid-column: 2; }
.customer-register-field-postal { max-width: 220px; }
.customer-register-message { min-height: 18px; margin: 5px 20px 0; line-height: 1.45; }
.customer-register-footer { position: sticky; bottom: 0; z-index: 2; margin: 8px 0 0; padding: 12px 20px 16px; background: #fff; }
.customer-register-footer button { min-width: 130px; }
@media(max-width:980px){
  .customer-access-layout { grid-template-columns: 1fr; }
  .customer-access-list { max-height: 280px; }
  .customer-rule-form { grid-template-columns: 1fr 1fr; }
  .customer-rule-candidates, .customer-rule-selected { margin-left: 0; }
}
@media(max-width:640px){
  .customer-access-summary, .customer-setting-grid, .customer-hanbaiou-billing-grid, .customer-default-shipping-grid, .customer-rule-form { grid-template-columns: 1fr; }
  .customer-access-save-bar { position: static; align-items: stretch; flex-direction: column; gap: 10px; }
  .customer-access-save-btn { width: 100%; white-space: normal; }
  .customer-order-publication { align-items: flex-start; flex-direction: column; gap: 10px; }
  .customer-order-publication-control { width: 100%; justify-content: flex-end; }
  .customer-category-toolbar { align-items: flex-start; flex-direction: column; }
  .customer-category-grid { grid-template-columns: 1fr 1fr; }
  .customer-access-add-btn { width: 100%; margin-left: 0; }
  .form-card.customer-register-card { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); margin: 6px; }
  .customer-register-header { padding: 14px; }
  .customer-register-flow { margin: 10px 14px 0; grid-template-columns: 1fr; }
  .customer-register-flow span { min-height: 38px; border-right: 0; border-bottom: 1px solid #dfe5ed; }
  .customer-register-flow span:last-child { border-bottom: 0; }
  .customer-register-confirm { margin: 10px 14px 0; }
  .customer-register-grid { grid-template-columns: 1fr; padding: 12px 14px 4px; }
  .customer-register-field-code, .customer-register-field-address, .customer-register-field-address2 { grid-column: auto; }
  .customer-register-field-postal { max-width: none; }
  .customer-register-message { margin-right: 14px; margin-left: 14px; }
  .customer-register-footer { padding: 10px 14px 14px; }
  .customer-register-footer button { flex: 1; min-width: 0; }
}

/* 送料マスタ */
#screen-customer-shipping.active,
#screen-shipping-rate-mgmt.active { height: 100vh; min-height: 0; overflow: hidden; }
.shipping-rate-mgmt-body { flex: 1; min-height: 0; width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 42px; overflow-y: auto; }
.shipping-rate-mgmt-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.shipping-rate-mgmt-intro h1 { color: #1a1a2e; font-size: 20px; letter-spacing: 0; }
.shipping-rate-mgmt-intro p { margin-top: 5px; color: #667085; font-size: 12px; line-height: 1.6; }
.shipping-rate-mgmt-intro-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.shipping-rate-b2-settings-button { min-height: 36px; border: 1px solid #287356; border-radius: 8px; padding: 8px 16px; background: #fff; color: #1f6248; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.shipping-rate-b2-settings-button:hover { background: #eef8f3; }
.shipping-rate-b2-settings-button:disabled { opacity: .5; cursor: default; }
.shipping-service-visibility { margin-bottom: 18px; border-top: 1px solid #dfe4eb; border-bottom: 1px solid #dfe4eb; background: #fff; }
.shipping-service-visibility-header { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #e7ebf0; }
.shipping-service-visibility-header h2 { color: #1d2939; font-size: 14px; letter-spacing: 0; }
.shipping-service-visibility-header > span { color: #667085; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.shipping-service-visibility-list { min-height: 48px; }
.shipping-service-carrier-group { display: grid; grid-template-columns: minmax(150px, 210px) 1fr; border-bottom: 1px solid #edf0f4; }
.shipping-service-carrier-group:last-child { border-bottom: 0; }
.shipping-service-carrier-group h3 { display: flex; align-items: center; margin: 0; padding: 12px; background: #f7f9fb; color: #273246; font-size: 12px; letter-spacing: 0; }
.shipping-service-carrier-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.shipping-service-visibility-item { min-width: 0; min-height: 54px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 12px; border-left: 1px solid #edf0f4; color: #344054; cursor: pointer; }
.shipping-service-visibility-item + .shipping-service-visibility-item { border-top: 1px solid #f1f3f6; }
.shipping-service-visibility-item.saving { background: #f7fbf9; }
.shipping-service-visibility-name { min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 800; }
.shipping-service-visibility-state { color: #667085; font-size: 10px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shipping-service-switch { position: relative; width: 38px; height: 22px; flex: 0 0 auto; }
.shipping-service-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.shipping-service-switch > span { display: block; width: 100%; height: 100%; border: 1px solid #aeb7c4; border-radius: 999px; background: #cfd5dd; transition: background .15s ease, border-color .15s ease; }
.shipping-service-switch > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.25); transition: transform .15s ease; }
.shipping-service-switch input:checked + span { border-color: #1f7655; background: #287f5d; }
.shipping-service-switch input:checked + span::after { transform: translateX(16px); }
.shipping-service-switch input:indeterminate + span { border-color: #b08228; background: #d7a641; }
.shipping-service-switch input:indeterminate + span::after { transform: translateX(8px); }
.shipping-service-switch input:focus-visible + span { outline: 2px solid #4f8ef7; outline-offset: 2px; }
.shipping-service-switch input:disabled { cursor: wait; }
.shipping-service-switch input:disabled + span { opacity: .55; }
.shipping-rate-mgmt-toolbar { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)) auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.shipping-rate-mgmt-toolbar label { display: grid; gap: 5px; color: #667085; font-size: 11px; font-weight: 700; }
.shipping-rate-mgmt-toolbar select { width: 100%; height: 38px; border: 1px solid #d0d5dd; border-radius: 6px; padding: 0 32px 0 10px; background: #fff; color: #1d2939; font-size: 12px; }
.shipping-rate-mgmt-toolbar .mgmt-count { justify-self: end; padding-bottom: 10px; }
.shipping-rate-mgmt-message { min-height: 18px; margin: -4px 0 8px; }
.shipping-rate-mgmt-list { overflow: hidden; border: 1px solid #dfe4eb; border-radius: 7px; background: #fff; }
.shipping-rate-mgmt-head,
.shipping-rate-mgmt-row { display: grid; grid-template-columns: minmax(120px, .75fr) minmax(180px, 1.1fr) 88px 104px 104px minmax(220px, 1.4fr) 70px 124px; align-items: stretch; }
.shipping-rate-mgmt-head { min-height: 38px; border-bottom: 1px solid #dfe4eb; background: #f5f7fa; color: #596579; font-size: 11px; font-weight: 800; }
.shipping-rate-mgmt-head > span { display: flex; align-items: center; padding: 8px 10px; border-right: 1px solid #e8ecf1; }
.shipping-rate-mgmt-head > span:last-child { border-right: 0; }
.shipping-rate-mgmt-row { min-height: 66px; border-bottom: 1px solid #edf0f4; color: #273246; font-size: 12px; }
.shipping-rate-mgmt-row:last-child { border-bottom: 0; }
.shipping-rate-mgmt-row.inactive { background: #fafafa; color: #7b8494; }
.shipping-rate-mgmt-cell { min-width: 0; padding: 10px; border-right: 1px solid #f0f2f5; overflow-wrap: anywhere; line-height: 1.5; }
.shipping-rate-mgmt-cell:last-child { border-right: 0; }
.shipping-rate-mgmt-cell strong { color: #162033; font-size: 13px; }
.shipping-rate-mgmt-cell > strong { display: block; }
.shipping-rate-mgmt-row.inactive .shipping-rate-mgmt-cell strong { color: #6d7583; }
.shipping-rate-cell-label { display: none; color: #7a8494; font-size: 10px; font-weight: 700; }
.shipping-rate-fee { color: #1e5b45; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.shipping-rate-fee.pending { color: #9a6700; font-size: 12px; }
.shipping-rate-tax-label { display: inline-flex; align-items: center; min-height: 18px; margin: 3px 0 0 5px; border: 1px solid #ccd5df; border-radius: 4px; padding: 1px 5px; background: #f6f7f9; color: #667085; font-size: 9px; font-weight: 800; vertical-align: middle; }
.shipping-rate-tax-label.excluded { border-color: #dfc07b; background: #fff8e8; color: #725313; }
.shipping-rate-tax-label.included { border-color: #add4bd; background: #edf8f1; color: #24613e; }
.shipping-rate-package-limits { display: block; margin-top: 3px; color: #697586; font-size: 10px; font-weight: 600; }
.shipping-rate-detail { display: grid; gap: 3px; color: #536173; font-size: 10px; line-height: 1.45; }
.shipping-rate-detail > span { display: block; }
.shipping-rate-detail b { color: #344054; font-weight: 800; }
.shipping-rate-origin { color: #255f4a; font-weight: 800; }
.shipping-rate-status { display: inline-flex; align-items: center; min-height: 22px; border: 1px solid #a9d3ba; border-radius: 5px; padding: 2px 7px; background: #edf8f1; color: #23623f; font-size: 10px; font-weight: 800; }
.shipping-rate-status.inactive { border-color: #d5d9df; background: #f2f4f7; color: #667085; }
.shipping-rate-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.form-card.shipping-rate-form-card { max-width: 720px; border-radius: 8px; }
.shipping-rate-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.shipping-rate-form-wide { grid-column: 1 / -1; }
.shipping-rate-form-card .form-textarea { width: 100%; box-sizing: border-box; resize: vertical; border: 1px solid #d7dce5; border-radius: 6px; padding: 9px 10px; color: #1d2939; font: inherit; font-size: 12px; line-height: 1.5; }
.shipping-rate-form-card .form-textarea:focus { border-color: #4f8ef7; outline: none; box-shadow: 0 0 0 2px rgba(79,142,247,.12); }
.shipping-rate-money-input { position: relative; }
.shipping-rate-money-input > span { position: absolute; z-index: 1; top: 50%; left: 11px; transform: translateY(-50%); color: #667085; font-size: 12px; font-weight: 800; }
.shipping-rate-money-input .form-input { padding-left: 28px; }
.shipping-rate-active-check { display: flex; align-items: center; gap: 8px; min-height: 40px; color: #344054; font-size: 12px; font-weight: 800; }
.shipping-rate-form-note { margin: 2px 0 8px; border-left: 3px solid #4f8ef7; padding: 7px 9px; background: #f5f9ff; color: #53657a; font-size: 11px; line-height: 1.6; }
@media(max-width:1000px){
  .shipping-rate-mgmt-head { display: none; }
  .shipping-rate-mgmt-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shipping-rate-mgmt-cell { border-bottom: 1px solid #f0f2f5; }
  .shipping-rate-mgmt-cell:nth-child(4n) { border-right: 0; }
  .shipping-rate-mgmt-cell:nth-last-child(-n+4) { border-bottom: 0; }
  .shipping-rate-cell-label { display: block; margin-bottom: 3px; }
}
@media(max-width:720px){
  .shipping-rate-mgmt-body { width: min(100% - 20px, 1240px); padding-top: 16px; }
  .shipping-rate-mgmt-intro { align-items: stretch; flex-direction: column; }
  .shipping-rate-mgmt-intro-actions { display: grid; grid-template-columns: 1fr; }
  .shipping-rate-mgmt-intro-actions button { width: 100%; }
  .shipping-service-carrier-group { grid-template-columns: 1fr; }
  .shipping-service-carrier-group h3 { border-bottom: 1px solid #edf0f4; }
  .shipping-service-visibility-item { border-left: 0; }
  .shipping-service-carrier-services { grid-template-columns: 1fr; }
  .shipping-rate-mgmt-toolbar { grid-template-columns: 1fr 1fr; }
  .shipping-rate-mgmt-toolbar .mgmt-count { justify-self: start; padding: 0; }
  .shipping-rate-mgmt-row { grid-template-columns: 1fr 1fr; }
  .shipping-rate-mgmt-cell:nth-child(2n) { border-right: 0; }
  .shipping-rate-mgmt-cell:nth-last-child(-n+4) { border-bottom: 1px solid #f0f2f5; }
  .shipping-rate-mgmt-cell:nth-last-child(-n+2) { border-bottom: 0; }
  .shipping-rate-form-grid { grid-template-columns: 1fr; }
  .shipping-rate-form-wide { grid-column: 1; }
}

/* 商品登録フォーム（モーダル風） */
.form-overlay   { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 400; align-items: center; justify-content: center; }
.form-overlay.show { display: flex; }
.form-card      { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; margin: 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.form-card h3   { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: #1a1a2e; }
.finished-label-reprint-card { max-width: 460px; }
.finished-label-reprint-card .form-input { min-height: 44px; }
.finished-label-reprint-card .form-footer button { min-width: 110px; }
.component-alt-card { max-width: 920px; }
.core-photo-choice-card { max-width: 520px; }
.core-photo-context { border: 1px solid #e7edf6; border-radius: 10px; background: #f8fbff; padding: 10px 12px; margin: 10px 0 12px; font-size: 12px; color: #455468; line-height: 1.55; }
.core-photo-context strong { display: block; color: #1a1a2e; font-size: 14px; margin-bottom: 2px; }
.core-photo-help { color: #667085; font-size: 12px; line-height: 1.6; margin: -4px 0 8px; }
.form-grid      { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-row       { margin-bottom: 12px; }
.form-label     { font-size: 12px; color: #888; margin-bottom: 4px; display: block; }
.form-input     { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 8px 12px; font-size: 14px; outline: none; }
.form-input:focus { border-color: #4f8ef7; }
.form-select    { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 8px 12px; font-size: 14px; outline: none; background: #fff; cursor: pointer; }
.form-footer    { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eee; }
.btn-cancel     { background: #f0f0f0; color: #555; border: none; border-radius: 8px; padding: 10px 20px; font-size: 14px; cursor: pointer; }
.btn-cancel:hover { background: #e0e0e0; }
.candidate-list { border: 1px solid #e0e0e0; border-radius: 8px; margin-top: 8px; overflow: hidden; background: #fff; display: none; }
.candidate-item { width: 100%; border: none; background: #fff; padding: 8px 10px; text-align: left; cursor: pointer; border-bottom: 1px solid #f0f0f0; font-size: 12px; }
.candidate-item:last-child { border-bottom: none; }
.candidate-item:hover { background: #f5f8ff; }
.candidate-main { font-weight: 600; color: #1a1a2e; }
.candidate-sub { color: #777; margin-top: 2px; font-family: monospace; }
.form-card.kikan-form-card { max-width: 980px; width: min(980px, calc(100vw - 24px)); }
.kikan-form-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); gap: 14px; align-items: start; }
.kikan-form-panel { border: 1px solid #e7edf7; border-radius: 10px; padding: 12px; background: #fbfdff; }
.kikan-form-panel-title { font-size: 12px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.kikan-multi-input { min-height: 72px; resize: vertical; line-height: 1.5; }
.kikan-search-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.kikan-search-actions .btn-sm-edit { min-height: 32px; padding: 6px 10px; }
.kikan-part-list { display: grid; gap: 7px; max-height: 270px; overflow: auto; }
.kikan-part-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid #eef1f6; border-radius: 8px; background: #fff; padding: 8px 10px; }
.kikan-part-main { min-width: 0; }
.kikan-part-title { font-size: 13px; font-weight: 700; color: #1a1a2e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kikan-part-meta { font-size: 11px; color: #718096; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kikan-part-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 7px; font-size: 10px; font-weight: 700; background: #eef5ff; color: #1a6fd4; white-space: nowrap; }
.kikan-part-empty { font-size: 12px; color: #99a3b3; padding: 10px; border: 1px dashed #d8e1ee; border-radius: 8px; background: #fff; }
.kikan-candidate-action { margin-left: auto; color: #1a6fd4; font-size: 11px; font-weight: 700; white-space: nowrap; }
.candidate-item.kikan-candidate-item { display: flex; gap: 10px; align-items: center; }
@media (max-width: 760px) {
  .kikan-form-grid { grid-template-columns: 1fr; }
  .form-card.kikan-form-card { max-width: calc(100vw - 16px); margin: 8px; padding: 16px; }
  .kikan-part-list { max-height: 220px; }
}
@media(max-width:640px){ .form-grid { grid-template-columns: 1fr; } }
.spec-box { margin: 12px 0 6px; border: 1px solid #e8edf5; border-radius: 8px; background: #fbfcff; padding: 10px 12px; }
.spec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.spec-title { font-size: 13px; font-weight: 700; color: #1a1a2e; }
.spec-main { font-size: 14px; font-weight: 700; color: #1a1a2e; }
.spec-sub { font-size: 11px; color: #888; margin-top: 3px; }
.spec-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.spec-chip { border: 1px solid #e0e7f2; border-radius: 6px; background: #fff; padding: 4px 7px; font-size: 11px; color: #555; }
.spec-chip strong { color: #1a5faa; margin-left: 4px; }
.detail-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 0 10px; border-bottom: 1px solid #f0f0f0; margin-bottom: 6px; }
.detail-category-name { font-size: 15px; font-weight: 700; color: #1a1a2e; line-height: 1.4; }
.detail-main-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; margin-bottom: 8px; flex: 0 0 auto; }
.detail-column { min-width: 0; }
.detail-block-title { font-size: 12px; font-weight: 700; color: #555; margin: 0 0 6px; }
.detail-vehicle-grid { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 0; border-top: 1px solid #f0f0f0; margin-bottom: 10px; }
.detail-vehicle-label { color: #888; font-size: 13px; padding: 7px 4px; border-bottom: 1px solid #f0f0f0; min-height: 34px; display: flex; align-items: center; }
.detail-vehicle-value { color: #1a1a2e; font-size: 13px; font-weight: 700; padding: 7px 4px; border-bottom: 1px solid #f0f0f0; min-height: 34px; display: flex; align-items: center; word-break: break-word; }
.detail-vehicle-maker-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 4px; }
.detail-vehicle-maker-row .catalog-vehicle-maker-value { min-width: 0; flex: 1; font-size: 13px; font-weight: 700; color: #1a1a2e; line-height: 1.35; }
.detail-vehicle-maker-row .catalog-vehicle-button { flex: 0 0 auto; padding: 2px 7px; font-size: 11px; line-height: 1.2; }
.detail-vehicle-action { grid-column: 1 / -1; padding: 8px 4px; border-bottom: 1px solid #f0f0f0; }
.vehicle-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.vehicle-table th { background: #f5f7fa; color: #555; font-weight: 700; padding: 7px 8px; text-align: left; border-bottom: 1px solid #e5e8ef; white-space: nowrap; }
.vehicle-table td { padding: 7px 8px; border-bottom: 1px solid #f0f2f5; vertical-align: top; }
.vehicle-dialog-body { max-height: 64vh; overflow: auto; border: 1px solid #edf0f5; border-radius: 8px; }
.vehicle-summary-note { color: #888; font-size: 12px; margin: 0 0 8px; line-height: 1.5; }
.detail-spec-block { margin-top: 0; }
.detail-spec-block .detail-block-title { margin-top: 0; }
.detail-spec-after-maker { margin-top: 10px; }
.detail-spec-grid { margin-bottom: 0; }
.detail-spec-value { font-weight: 700; }
.spec-inline-wrap { display: block; min-width: 0; max-width: none; }
.spec-inline { display: flex; align-items: flex-start; justify-content: flex-start; gap: 8px; flex-wrap: wrap; border-top: 1px solid #f0f0f0; padding-top: 7px; }
.spec-inline-title { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #555; white-space: nowrap; }
.spec-inline .spec-grid { margin-top: 0; justify-content: flex-start; }
.spec-inline-empty { color: #aaa; font-size: 12px; }
.ac-part-grid { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid #f0f0f0; margin-bottom: 8px; }
.ac-part-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 0; align-items: stretch; min-width: 0; border-bottom: 1px solid #f0f0f0; min-height: 34px; }
.ac-part-label { font-size: 13px; color: #888; padding: 7px 4px; display: flex; align-items: center; }
.ac-part-value { font-size: 13px; font-weight: 700; color: #1a1a2e; padding: 7px 4px; display: flex; align-items: center; justify-content: flex-start; text-align: left; word-break: break-all; }
.ac-part-value-with-action { justify-content: space-between; gap: 8px; padding: 5px 4px; }
.ac-part-value-text { flex: 1 1 auto; min-width: 0; text-align: left; overflow-wrap: anywhere; }
.detail-inline-action { flex: 0 0 auto; white-space: nowrap; padding: 5px 9px; }
.detail-mobile-actions { display: none; }
.detail-main-grid .detail-table,
.detail-main-grid .ac-part-grid { margin-bottom: 0; }
.detail-main-grid .detail-table { margin-top: 0 !important; }
.detail-column > .detail-table:first-child { border-top: 1px solid #f0f0f0; }
.detail-column > .detail-vehicle-grid { margin-bottom: 0; }
.detail-column > .detail-vehicle-grid + .ac-part-grid { border-top: 0; }
.detail-maker-offset { margin-top: 64px; }
.detail-maker-offset-standard { margin-top: 96px; }
.detail-maker-offset-ac { margin-top: 64px; }
@media (max-width: 1180px) {
  .detail-main-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .detail-maker-offset, .detail-maker-offset-standard, .detail-maker-offset-ac { margin-top: 8px; }
}
@media(max-width:720px){
  .detail-main-grid { grid-template-columns: 1fr; gap: 8px; }
  .detail-lower-grid { grid-template-columns: 1fr; grid-auto-rows: minmax(0, 1fr); }
  .detail-summary { flex-direction: column; gap: 6px; }
  .detail-maker-offset, .detail-maker-offset-standard, .detail-maker-offset-ac { margin-top: 8px; }
  .detail-vehicle-grid { grid-template-columns: 112px minmax(0, 1fr); }
  .spec-inline-wrap { justify-content: flex-start; max-width: none; width: 100%; }
  .spec-inline { justify-content: flex-start; }
  .spec-inline .spec-grid { justify-content: flex-start; }
  .ac-part-row { grid-template-columns: 112px minmax(0, 1fr); gap: 0; }
}
.spec-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.spec-form-help { font-size: 12px; color: #777; line-height: 1.45; margin-top: 5px; }
.form-card #gltek-product-add-panel { margin: 14px 0; padding: 12px; border: 1px solid #cfe0f6; border-radius: 10px; background: #f7fbff; }
.form-card #gltek-product-add-panel > .form-row { margin-bottom: 8px; }
#gltek-product-issuance-fields { margin-top: 10px; padding-top: 10px; border-top: 1px solid #dbe7f8; }
.spec-form-hidden { display: none !important; }
.form-help { font-size: 12px; color: #667085; line-height: 1.45; margin: 0 0 10px; }
@media(max-width:640px){ .spec-form-grid { grid-template-columns: 1fr; } }

/* 商品追加・修正フォーム */
#part-form-overlay { padding: 12px; box-sizing: border-box; }
.form-card.product-form-card {
  width: min(1240px, calc(100vw - 24px));
  max-width: 1240px;
  max-height: calc(100vh - 24px);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 24px 70px rgba(18, 32, 56, .28);
}
.product-form-header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #dfe8f5;
  background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
}
.product-form-header .product-form-eyebrow {
  color: #1a6fd4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.form-card.product-form-card .product-form-header h3 {
  margin: 2px 0 3px;
  color: #162033;
  font-size: 20px;
  line-height: 1.3;
}
.product-form-header p {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}
.product-form-required-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.product-form-either-required {
  flex: 0 0 auto;
  padding: 1px 5px;
  border: 1px solid #f2b8b3;
  border-radius: 3px;
  background: #fff4f2;
  color: #c72d24;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}
.product-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: 14px;
  align-items: start;
  padding: 16px 20px 10px;
}
.product-form-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e3e9f2;
  border-radius: 12px;
  background: #fbfcfe;
}
.product-form-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-bottom: 12px;
}
.product-form-step {
  display: inline-flex;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #1a6fd4;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(26,111,212,.2);
}
.product-form-section-head h4 {
  margin: 0;
  color: #1a1a2e;
  font-size: 14px;
  line-height: 1.3;
}
.product-form-section-head p {
  margin: 2px 0 0;
  color: #7b8494;
  font-size: 11px;
  line-height: 1.35;
}
.product-form-basic-grid,
.product-form-spec-grid {
  display: grid;
  gap: 10px 12px;
}
.product-form-basic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-form-spec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-form-span-all { grid-column: 1 / -1; }
.product-form-card .form-row { min-width: 0; margin-bottom: 0; }
.product-form-card .form-label {
  margin-bottom: 5px;
  color: #536176;
  font-size: 11px;
  font-weight: 700;
}
.product-form-card .form-input,
.product-form-card .form-select {
  min-height: 38px;
  border-color: #d4dce8;
  background: #fff;
}
.product-form-card .form-input:focus,
.product-form-card .form-select:focus {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26,111,212,.12);
}
.product-form-card #gltek-product-add-panel {
  margin: 12px 0 0;
  padding: 11px;
  border-radius: 9px;
}
.product-form-card #gltek-product-add-panel.is-active {
  border-color: #78a9e8;
  background: #eef6ff;
  box-shadow: 0 0 0 2px rgba(26,111,212,.08);
}
.gltek-mode-entry,
.gltek-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gltek-mode-open,
.gltek-mode-close {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
}
.gltek-mode-head { align-items: flex-start; }
.gltek-mode-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px;
  margin: 8px 0;
  padding: 8px 10px 8px 28px;
  border: 1px solid #d8e7fa;
  border-radius: 8px;
  background: #fff;
  color: #46566d;
  font-size: 11px;
  line-height: 1.45;
}
.product-form-card .form-input.gltek-base-identity {
  background: #f2f5f9;
  color: #526074;
}
.product-form-card #gltek-product-add-panel .spec-head { margin-bottom: 8px; }
.product-form-card #gltek-product-issuance-fields { margin-top: 8px; padding-top: 8px; }
.product-form-stamp-pairs { margin-top: 12px; border-top: 1px solid #dfe6ef; padding-top: 11px; }
.product-form-stamp-pair-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.product-form-stamp-pair-head > div { min-width: 0; }
.product-form-stamp-pair-head .spec-form-help { margin-top: 2px; }
.product-form-stamp-pair-head .btn-sm-edit { flex: 0 0 auto; min-height: 32px; border-radius: 6px; }
.product-form-stamp-pair-list { display: grid; gap: 8px; max-height: 180px; overflow-y: auto; padding-right: 2px; }
.product-form-stamp-pair-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 32px; gap: 8px; align-items: end; border: 1px solid #d5dfeb; border-left: 3px solid #4f8fea; border-radius: 5px; padding: 7px 7px 7px 9px; background: #f8fbff; }
.product-form-stamp-pair-row label { display: grid; min-width: 0; gap: 3px; }
.product-form-stamp-pair-row label > span { color: #667085; font-size: 10px; font-weight: 700; }
.product-form-card .product-form-stamp-pair-row .form-input { min-height: 34px; font-variant-numeric: tabular-nums; }
.product-form-stamp-pair-remove { display: inline-flex; width: 32px; min-width: 32px; height: 34px; align-items: center; justify-content: center; border: 1px solid #efb4b0; border-radius: 6px; background: #fff8f7; color: #bd352e; font-size: 18px; line-height: 1; cursor: pointer; }
.product-form-stamp-pair-remove:hover { border-color: #d95a52; background: #fff0ee; }
.product-form-raw-spec { margin-bottom: 12px !important; }
.product-form-raw-spec .spec-form-help {
  margin-top: 4px;
  color: #6d7788;
  font-size: 11px;
}
.product-form-note { margin-top: 12px !important; }
.product-form-error {
  min-height: 0;
  margin: 0;
  text-align: left;
}
.product-form-error:not(:empty) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-height: min(24vh, 140px);
  margin-top: 10px;
  padding: 8px 10px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  border: 1px solid #f3b3ae;
  border-left: 3px solid #d92d20;
  border-radius: 4px;
  background: #fff4f2;
  color: #912018;
  font-size: 12px;
  line-height: 1.45;
}
.form-footer.product-form-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 0;
  padding: 12px 20px 16px;
  border-top: 1px solid #e3e9f2;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
}
.product-form-footer .btn-cancel,
.product-form-footer .btn-primary {
  min-width: 112px;
  min-height: 40px;
  font-weight: 700;
}
.form-footer.product-form-footer { flex-wrap: wrap; }
.unused-product-deletion { box-sizing: border-box; margin: 0 20px 16px; padding: 14px; border: 1px solid #e8c7c7; border-radius: 10px; background: #fffafa; text-align: left; font-size: 13px; overflow-wrap: anywhere; }
.unused-product-deletion[hidden], .unused-product-confirm[hidden], .unused-product-notice[hidden] { display: none; }
.unused-product-deletion h4 { margin: 0 0 8px; color: #7f2029; font-size: 15px; }
.unused-product-deletion p { margin: 6px 0; }
.unused-product-deletion ul { margin: 6px 0 10px; padding-left: 22px; }
.unused-product-identity { font-weight: 700; }
.unused-product-group-title { font-weight: 700; }
.unused-product-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.unused-product-deletion button { min-height: 40px; padding: 8px 14px; }
.unused-product-deletion .btn-danger { border: 1px solid #a91d32; border-radius: 7px; color: #fff; background: #a91d32; font-weight: 700; cursor: pointer; }
.unused-product-deletion button:disabled { opacity: .45; cursor: not-allowed; }
.unused-product-deletion button:focus-visible, .unused-product-deletion textarea:focus-visible { outline: 3px solid #1a6fd4; outline-offset: 2px; }
.unused-product-confirm { border-top: 1px solid #e8c7c7; margin-top: 12px; padding-top: 12px; }
.unused-product-confirm textarea { display: block; width: 100%; box-sizing: border-box; margin: 6px 0 10px; }
.unused-product-ack { display: flex; gap: 8px; align-items: flex-start; }
.unused-product-notice { padding: 12px; border: 1px solid #bcd7c7; border-radius: 8px; background: #f1faf5; }
@media(max-width:640px) {
  .unused-product-deletion { padding: 10px; margin: 0 12px 12px; }
  .unused-product-actions > button { flex: 1 1 140px; min-width: 0; }
}
@media(max-width:960px) {
  .product-form-layout { grid-template-columns: 1fr; }
  .product-form-card { max-width: 760px; }
}
@media(max-width:640px) {
  #part-form-overlay { padding: 0; align-items: stretch; }
  .form-card.product-form-card {
    width: 100vw;
    max-width: none;
    max-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .product-form-header { padding: 14px 14px 11px; }
  .product-form-header p { display: none; }
  .product-form-layout { gap: 10px; padding: 10px; }
  .product-form-section { padding: 11px; }
  .product-form-basic-grid { grid-template-columns: 1fr; }
  .gltek-mode-entry, .gltek-mode-head { align-items: stretch; flex-direction: column; }
  .gltek-mode-open, .gltek-mode-close { width: 100%; }
  .gltek-mode-rules { grid-template-columns: 1fr; }
  .product-form-spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-form-stamp-pair-head { align-items: stretch; flex-direction: column; }
  .product-form-stamp-pair-head .btn-sm-edit { width: 100%; }
  .product-form-stamp-pair-row { grid-template-columns: 1fr; align-items: stretch; }
  .product-form-stamp-pair-remove { justify-self: end; }
  .product-form-error:not(:empty) { margin-top: 8px; }
  .form-footer.product-form-footer { padding: 10px 12px 12px; }
  .product-form-footer .btn-cancel, .product-form-footer .btn-primary { flex: 1; min-width: 0; }
}
@media(max-width:400px) {
  .product-form-spec-grid { grid-template-columns: 1fr; }
}
@media(max-height:900px) and (min-width:961px) {
  .product-form-header { align-items: center; padding-top: 9px; padding-bottom: 8px; }
  .product-form-header p,
  .product-form-section-head p { display: none; }
  .product-form-layout { gap: 12px; padding: 10px 16px 8px; }
  .product-form-section { padding: 11px; }
  .product-form-section-head { min-height: 30px; margin-bottom: 7px; }
  .product-form-basic-grid, .product-form-spec-grid { gap: 7px 10px; }
  .product-form-core-policy,
  .product-form-shipping { margin-top: 10px; padding-top: 10px; }
  .product-form-core-policy-grid { gap: 10px; margin-top: 8px; }
  .product-form-shipping-grid { margin-top: 7px; }
  .product-form-raw-spec { margin-bottom: 8px !important; }
  .product-form-note { margin-top: 8px !important; }
  .product-form-card .form-input, .product-form-card .form-select { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
  .form-footer.product-form-footer { padding-top: 9px; padding-bottom: 10px; }
}

/* ログ画面 */
.log-table      { width: 100%; border-collapse: collapse; font-size: 12px; }
.log-table th   { background: #f5f7fa; color: #555; font-weight: 600; padding: 8px 10px; text-align: left; border-bottom: 2px solid #e0e0e0; }
.log-table td   { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.log-insert     { color: #1a8c3e; font-weight: 600; }
.log-update     { color: #1a5faa; font-weight: 600; }
.log-delete     { color: #e24b4a; font-weight: 600; }
.log-json       { font-family: monospace; font-size: 11px; color: #666; max-width: 300px; word-break: break-all; }
.log-details { min-width: 240px; max-width: 520px; line-height: 1.65; overflow-wrap: anywhere; }
.log-change { margin-bottom: 3px; }
.log-change-more summary { cursor: pointer; color: #2459a6; }
#logs-list { overflow-x: auto; }
#logs-list .log-table { min-width: 760px; }
.pass-strength-bar  { height: 4px; border-radius: 2px; background: #eee; overflow: hidden; margin-bottom: 4px; }
.pass-strength-fill { height: 100%; border-radius: 2px; width: 0%; transition: width .3s, background .3s; }
.pass-strength-label { font-size: 11px; color: #888; }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.status-pending  { background: #fff8e6; color: #b07800; }
.status-active   { background: #e8f7ee; color: #1a8c3e; }
.status-suspended{ background: #ffeaea; color: #c0392b; }
.status-auth-invitation-pending { background: #fff8e6; color: #8a5a00; }
.status-auth-confirmed { background: #eef4ff; color: #175cd3; }
.status-auth-active { background: #e8f7ee; color: #16723a; }
.status-auth-unavailable,
.status-auth-unknown { background: #f2f4f7; color: #667085; }
.group-select { border: 1px solid #ddd; border-radius: 6px; padding: 6px 10px; font-size: 13px; outline: none; cursor: pointer; flex: 1; min-width: 100px; background: #fff; }
.btn-approve  { background: #1a8c3e; color: #fff; border: none; border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn-approve:hover { background: #156e30; }
.btn-suspend  { background: #e24b4a; color: #fff; border: none; border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn-suspend:hover { background: #c0392b; }
.btn-activate { background: #4f8ef7; color: #fff; border: none; border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.pending-banner { background: #fff8e6; border: 1px solid #f0b429; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #b07800; margin-bottom: 12px; text-align: center; }
.user-company { font-size: 11px; color: #aaa; margin-top: 1px; }

/* =============================================
   ログイン画面
============================================= */
#screen-login { background: var(--dcats-navy); align-items: center; justify-content: center; }
.login-card { background: #fff; border-radius: 18px; padding: 36px 32px 24px; width: 100%; max-width: 360px; margin: 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.login-logo    { text-align: center; margin-bottom: 8px; }
.login-brand-lockup { display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.login-logo-mark { display: block; width: 54px; height: 54px; margin: 0; object-fit: contain; flex: 0 0 auto; }
.reg-card .login-logo-mark { width: 48px; height: 48px; }
.login-logo h1 { font-size: 30px; line-height: 1; font-weight: 800; color: var(--dcats-navy); letter-spacing: .08em; }
.reg-card .login-logo h1 { font-size: 26px; }
.login-logo p  { font-size: 11px; color: #aaa; margin-top: 8px; }
.login-divider { border: none; border-top: 1px solid #f0f0f0; margin: 20px 0 16px; }
.login-label   { font-size: 12px; color: #888; margin-bottom: 4px; display: block; }
.login-input   { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; font-size: 14px; outline: none; margin-bottom: 12px; }
.login-input:focus { border-color: var(--dcats-brand-red); box-shadow: 0 0 0 3px var(--dcats-brand-red-focus); }
.btn-login  { width: 100%; background: var(--dcats-brand-red); color: #fff; border: none; border-radius: 8px; padding: 12px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 4px; }
.btn-login:hover    { background: var(--dcats-brand-red-hover); }
.btn-login:disabled { opacity: 0.6; pointer-events: none; }
.btn-primary:focus-visible,
.btn-login:focus-visible,
.btn-search:focus-visible,
.lang-btn-login:focus-visible,
.chip:focus-visible,
.app-update-banner button:focus-visible { outline: 3px solid var(--dcats-brand-red-focus); outline-offset: 2px; }
.login-error { color: #e24b4a; font-size: 12px; margin-top: 10px; text-align: center; min-height: 18px; }

/* Login experience v1.1.710 */
#screen-login {
  min-height: 100vh;
  min-height: 100svh;
  align-items: stretch;
  justify-content: stretch;
  overflow-y: auto;
  background: #f7f8fa url("assets/login/login-bg-desktop-v1.png") center / cover no-repeat;
  color: #13233f;
  font-family: var(--dcats-font-ui);
}
.login-card.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 62%) minmax(400px, 38%);
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.login-brand-panel {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  padding: clamp(64px, 8vw, 118px) clamp(56px, 8vw, 118px) 24px;
}
#screen-login .login-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(20px, 2vw, 30px);
  margin-top: clamp(12px, 6vh, 68px);
}
.login-brand-mark {
  display: block;
  width: clamp(84px, 7.5vw, 112px);
  height: clamp(84px, 7.5vw, 112px);
  flex: 0 0 auto;
  object-fit: contain;
}
.login-brand-copy h1 {
  color: #13233f;
  font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .09em;
  white-space: nowrap;
}
.login-brand-copy p {
  margin-top: 14px;
  color: #1c2e4b;
  font-size: clamp(16px, 1.45vw, 22px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .02em;
  white-space: nowrap;
}
.login-form-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: clamp(40px, 6vh, 72px) clamp(36px, 4.5vw, 72px);
}
.login-form-content { width: min(100%, 440px); }
.login-form-header { margin-bottom: 34px; }
.login-form-header h2 {
  color: #13233f;
  font-size: clamp(30px, 2.6vw, 38px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .02em;
}
.login-form-header p {
  margin-top: 12px;
  color: #8792a7;
  font-size: 14px;
  font-weight: 600;
}
.login-fields { width: 100%; }
#screen-login .login-label {
  display: block;
  margin: 0 0 8px;
  color: #172943;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
#screen-login .login-input {
  display: block;
  width: 100%;
  height: 54px;
  margin: 0 0 22px;
  padding: 0 16px;
  border: 1px solid #bcc6d4;
  border-radius: 10px;
  outline: none;
  background: rgba(255,255,255,.58);
  color: #13233f;
  font-family: inherit;
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
#screen-login .login-input::placeholder { color: #98a2b4; opacity: 1; }
#screen-login .login-input:hover { border-color: #9eabbd; background: rgba(255,255,255,.75); }
#screen-login .login-input:focus {
  border-color: var(--dcats-focus);
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 3px rgba(47,111,237,.14);
}
.login-password-field { position: relative; margin-bottom: 20px; }
#screen-login .login-password-field .login-input { margin-bottom: 0; padding-right: 52px; }
.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7f899c;
  cursor: pointer;
  transform: translateY(-50%);
}
.login-password-toggle:hover { background: rgba(19,35,63,.06); }
.login-password-toggle:focus-visible { outline: 3px solid rgba(47,111,237,.28); outline-offset: 1px; }
.login-password-toggle img { display: block; width: 24px; height: 24px; opacity: .7; }
#screen-login .btn-login {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: var(--dcats-brand-red);
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
}
#screen-login .btn-login:hover { background: var(--dcats-brand-red-hover); box-shadow: 0 8px 22px rgba(214,0,29,.18); }
#screen-login .btn-login:active { transform: translateY(1px); }
#screen-login .btn-login:focus-visible { outline: 3px solid rgba(47,111,237,.32); outline-offset: 3px; }
#screen-login .btn-login:disabled { opacity: .58; pointer-events: none; }
#screen-login .login-error {
  min-height: 20px;
  margin-top: 8px;
  color: #c62a36;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}
.login-forgot-link {
  width: auto;
  margin: 4px auto 0;
  color: #1478ee;
  font-size: 13px;
  font-weight: 600;
  text-underline-offset: 3px;
}
.login-utility {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-top: 34px;
}
.login-utility .app-version-wrap { justify-content: center; color: #7f899c; font-size: 12px; }
.login-utility .app-manual-refresh {
  border-color: var(--dcats-focus);
  background: rgba(255,255,255,.65);
  color: var(--dcats-focus);
  font-size: 11px;
  padding: 5px 10px;
}
.login-utility .app-manual-refresh:hover { background: rgba(47,111,237,.08); border-color: #244fa6; }
.login-utility .lang-sw-login {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.login-utility .lang-btn-login {
  min-width: 64px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid #c8d0dc;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  color: #69758a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
}
.login-utility .lang-btn-login:hover:not(.active) { border-color: #9eabbd; color: #273750; }
.login-utility .lang-btn-login.active { border-color: var(--dcats-brand-red); background: var(--dcats-brand-red); color: #fff; }
.app-install-entry {
  width: 100%;
  text-align: center;
}
.app-install-entry[hidden],
.app-install-header-entry[hidden],
.app-install-dialog[hidden],
.app-install-intro[hidden],
.app-install-dialog-actions[hidden],
.app-install-share-coachmark[hidden],
.app-install-instructions[hidden],
.app-install-copy-status[hidden],
.app-install-copy-error[hidden],
.app-install-safari-note[hidden] { display: none; }
.app-install-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 9px 16px;
  border: 1px solid #b9c5d5;
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  color: #183253;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.app-install-button img { display: block; width: 28px; height: 28px; border-radius: 7px; }
.app-install-button:hover { border-color: #7588a2; background: #fff; box-shadow: 0 6px 18px rgba(19,35,63,.1); }
.app-install-button:active { transform: translateY(1px); }
.app-install-button:focus-visible { outline: 3px solid rgba(47,111,237,.3); outline-offset: 3px; }
.app-install-entry p {
  margin-top: 7px;
  color: #7f899c;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}
.app-install-header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.app-install-header-button img { display: block; width: 22px; height: 22px; border-radius: 5px; }
.app-install-header-button:hover { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.2); }
.app-install-header-button:focus-visible { outline: 3px solid rgba(255,255,255,.65); outline-offset: 2px; }
.app-install-dialog {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}
.app-install-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,22,42,.58);
  backdrop-filter: blur(3px);
}
.app-install-dialog-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: calc(100vh - 40px);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  background: #fff;
  color: #13233f;
  box-shadow: 0 24px 70px rgba(10,22,42,.3);
  text-align: center;
}
.app-install-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f2f5f8;
  color: #59677b;
  font-size: 17px;
  cursor: pointer;
}
.app-install-dialog-close:hover { background: #e7ebf0; color: #13233f; }
.app-install-dialog-close:focus-visible,
.app-install-dialog-done:focus-visible,
.app-install-dialog-secondary:focus-visible,
.app-install-copy-row button:focus-visible,
.app-install-copy-row input:focus-visible { outline: 3px solid rgba(47,111,237,.3); outline-offset: 2px; }
.app-install-dialog-brand {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(19,35,63,.14);
}
.app-install-dialog-brand img { display: block; width: 54px; height: 54px; border-radius: 11px; }
.app-install-dialog-card h2 { font-size: 22px; font-weight: 800; line-height: 1.35; }
.app-install-dialog-card > p {
  margin: 9px auto 20px;
  color: #66748a;
  font-size: 13px;
  line-height: 1.65;
}
.app-install-intro > p {
  margin: 0;
  color: #233750;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;
  text-align: left;
}
.app-install-intro .app-install-repeat-note {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  background: #f2f5f8;
  color: #66748a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}
.app-install-instructions { text-align: left; }
.app-install-instructions ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: app-install-step;
}
.app-install-instructions li {
  position: relative;
  min-height: 44px;
  padding: 12px 12px 12px 52px;
  border: 1px solid #dfe5ec;
  border-radius: 10px;
  background: #f7f9fb;
  color: #233750;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
  counter-increment: app-install-step;
}
.app-install-instructions li::before {
  content: counter(app-install-step);
  position: absolute;
  top: 10px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #183253;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.app-install-toolbar-demo {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 5px;
  margin-top: 13px;
  padding: 8px 10px;
  border: 1px solid #dce3eb;
  border-radius: 12px;
  background: #f7f9fb;
  color: #607086;
  font-size: 24px;
  line-height: 1;
  text-align: center;
}
.app-install-toolbar-back {
  font-size: 34px;
  font-weight: 300;
}
.app-install-toolbar-address {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 22px;
  background: #fff;
  color: #27384f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -.01em;
  overflow: hidden;
  white-space: nowrap;
}
.app-install-toolbar-address > span {
  margin-left: 6px;
  font-size: 20px;
}
.app-install-toolbar-target {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 2px solid var(--dcats-brand-red);
  border-radius: 10px;
  background: #fff1f3;
  color: #17395f;
  box-shadow: 0 0 0 4px rgba(221,0,38,.08);
  animation: app-install-target-pulse 1.4s ease-in-out infinite;
}
.app-install-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 38px;
  margin: 0 auto;
  color: #3268bd;
}
.app-install-toolbar-forward { font-size: 34px; font-weight: 300; opacity: .38; }
.app-install-toolbar-bookmark { font-size: 23px; }
.app-install-toolbar-tabs { font-size: 25px; }
.app-install-share-glyph {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  width: 25px;
  height: 21px;
  padding-top: 0;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 3px;
  font-size: 22px;
  font-weight: 800;
  line-height: 16px;
}
.app-install-toolbar-hint {
  margin: 7px 0 0;
  color: #41546c;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}
.app-install-direct-share-note {
  margin: 9px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef5fc;
  color: #39526f;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}
.app-install-missing-action-note,
.app-install-browser-warning {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #f1d6a7;
  border-radius: 10px;
  background: #fff8e9;
  color: #6c4712;
  line-height: 1.55;
}
.app-install-missing-action-note strong,
.app-install-browser-warning strong { font-size: 13px; }
.app-install-missing-action-note span,
.app-install-browser-warning span { font-size: 12px; font-weight: 600; }
.app-install-browser-warning {
  margin: 0 0 12px;
  border-color: #efc4ca;
  background: #fff2f4;
  color: #7f2431;
}
.app-install-browser-guide ol { gap: 8px; }
.app-install-browser-guide li { min-height: 40px; padding-top: 10px; padding-bottom: 10px; }
.app-install-browser-guide li::before { top: 8px; }
.app-install-url-label {
  display: block;
  margin: 13px 0 5px;
  color: #40526a;
  font-size: 12px;
  font-weight: 750;
}
.app-install-copy-row { display: grid; gap: 8px; }
.app-install-copy-row input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cfd8e4;
  border-radius: 9px;
  background: #f7f9fb;
  color: #233750;
  font-family: inherit;
  font-size: 12px;
}
.app-install-copy-row button {
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: #183253;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.app-install-copy-row button:hover { background: #102743; }
.app-install-copy-status,
.app-install-copy-error {
  margin: 8px 0 0;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.app-install-copy-status { background: #edf8f1; color: #245738; }
.app-install-copy-error { background: #fff1f2; color: #8a2632; }
@keyframes app-install-target-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.app-install-safari-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--dcats-brand-red);
  border-radius: 6px;
  background: #fff4f5;
  color: #8e2631;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.app-install-dialog-done {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: #183253;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.app-install-dialog-done:hover { background: #102743; }
.app-install-dialog-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.app-install-verification-note {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid #cfe0d5;
  border-radius: 10px;
  background: #f0f8f3;
  color: #244b34;
  line-height: 1.55;
  text-align: left;
}
.app-install-verification-note strong { font-size: 13px; }
.app-install-verification-note span { color: #4c6858; font-size: 12px; font-weight: 600; }
.app-install-dialog-secondary {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd7e2;
  border-radius: 10px;
  background: #fff;
  color: #52627a;
  font-family: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.app-install-dialog-secondary:hover { border-color: #9eabbd; background: #f7f9fb; color: #233750; }
.app-install-share-coachmark {
  position: fixed;
  z-index: 4990;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 410px);
  padding: 15px 44px 18px 16px;
  border: 1px solid rgba(255,255,255,.72);
  border-top: 4px solid var(--dcats-brand-red);
  border-radius: 15px;
  background: #fff;
  color: #13233f;
  box-shadow: 0 18px 50px rgba(10,22,42,.3);
}
.app-install-coachmark-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f2f5f8;
  color: #59677b;
  font-size: 15px;
  cursor: pointer;
}
.app-install-coachmark-step {
  display: block;
  margin-bottom: 8px;
  color: var(--dcats-brand-red);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
}
.app-install-coachmark-main { display: flex; align-items: center; gap: 12px; }
.app-install-coachmark-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: #eaf2fb;
  color: #17395f;
  animation: app-install-target-pulse 1.4s ease-in-out infinite;
}
.app-install-coachmark-main strong { display: block; font-size: 15px; line-height: 1.45; }
.app-install-coachmark-main p { margin: 4px 0 0; color: #5f6f84; font-size: 12px; font-weight: 600; line-height: 1.55; }
.app-install-coachmark-pointer {
  position: absolute;
  left: 50%;
  bottom: -8px;
  margin-left: -15px;
  color: var(--dcats-brand-red);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(255,255,255,.95);
  animation: app-install-pointer-bounce .9s ease-in-out infinite alternate;
}
@keyframes app-install-pointer-bounce {
  from { transform: translateY(-4px); }
  to { transform: translateY(3px); }
}
.app-install-coachmark-close:focus-visible { outline: 3px solid rgba(47,111,237,.3); outline-offset: 2px; }
body.app-install-dialog-open { overflow: hidden; }
.login-partners {
  position: absolute;
  bottom: clamp(48px, 6vh, 72px);
  left: 0;
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px clamp(56px, 8vw, 118px) 48px;
  color: #142640;
}
.login-partner { display: inline-flex; align-items: center; gap: 10px; }
.login-partner > span {
  font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
}
.login-partner-mark { display: block; flex: 0 0 auto; object-fit: contain; }
.login-partner-mark-daiko { width: 38px; height: 38px; border-radius: 50%; mix-blend-mode: multiply; }
.login-partner-mark-gltek { width: 44px; height: 32px; }
.login-partner-separator { color: #a5afbe; font-size: 30px; font-weight: 300; line-height: 1; }

@media (max-width: 900px) {
  #screen-login { background-image: url("assets/login/login-bg-mobile-v1.png"); background-position: top center; }
  .login-card.login-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
  }
  .login-brand-panel {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 270px;
    padding: 48px 24px 16px;
  }
  #screen-login .login-brand-lockup { gap: 16px; margin: 0 auto; }
  .login-brand-mark { width: 72px; height: 72px; }
  .login-brand-copy h1 { font-size: clamp(37px, 11vw, 46px); letter-spacing: .07em; }
  .login-brand-copy p { margin-top: 8px; font-size: clamp(12px, 3.5vw, 14px); letter-spacing: 0; }
  .login-form-panel { display: block; width: 100%; padding: 6px 24px 14px; }
  .login-form-content { width: 100%; max-width: 440px; margin: 0 auto; }
  .login-form-header { margin-bottom: 22px; text-align: center; }
  .login-form-header h2 { font-size: 30px; }
  .login-form-header p { margin-top: 6px; font-size: 13px; }
  #screen-login .login-label { margin-bottom: 6px; font-size: 13px; }
  #screen-login .login-input { height: 52px; margin-bottom: 16px; }
  .login-password-field { margin-bottom: 16px; }
  #screen-login .btn-login { min-height: 52px; font-size: 16px; }
  #screen-login .login-error { min-height: 18px; margin-top: 6px; }
  .login-forgot-link { margin-top: 2px; }
  .login-utility { gap: 16px; margin-top: 20px; }
  .app-install-button { min-height: 50px; font-size: 14px; }
  .login-utility .lang-btn-login { min-width: 62px; min-height: 36px; }
  .login-partners {
    position: static;
    display: flex;
    justify-content: center;
    gap: 14px;
    width: 100%;
    margin-top: auto;
    padding: 12px 20px 24px;
  }
  .login-partner { gap: 7px; }
  .login-partner > span { font-size: 18px; }
  .login-partner-mark-daiko { width: 32px; height: 32px; }
  .login-partner-mark-gltek { width: 38px; height: 28px; }
  .login-partner-separator { font-size: 24px; }
  .app-install-header-button { width: auto; min-height: 34px; padding: 5px 8px; gap: 5px; }
  .app-install-header-button span { display: inline; font-size: 10px; }
}

@media (max-width: 420px) {
  .login-brand-panel { min-height: 250px; padding-top: 42px; }
  #screen-login .login-brand-lockup { gap: 13px; }
  .login-brand-mark { width: 64px; height: 64px; }
  .login-brand-copy h1 { font-size: 38px; }
  .login-brand-copy p { font-size: 12px; }
  .login-form-panel { padding-right: 20px; padding-left: 20px; }
  .app-install-dialog { padding: 12px; }
  .app-install-dialog-card { max-height: calc(100svh - 24px); padding: 26px 20px 20px; border-radius: 15px; }
  .app-install-dialog-card h2 { padding: 0 16px; font-size: 19px; }
}

@media (max-width: 600px) and (max-height: 670px) {
  #screen-login .login-brand-panel { min-height: 110px; padding-block: 14px 8px; }
  #screen-login .login-form-panel { padding-block: 0 8px; }
  #screen-login .login-form-header { margin-bottom: 10px; }
  #screen-login .login-input { height: 44px; margin-bottom: 9px; }
  #screen-login .login-password-field { margin-bottom: 9px; }
  #screen-login .btn-login { min-height: 44px; }
  #screen-login .login-utility { gap: 8px; margin-top: 12px; }
  #screen-login .login-partners { padding-block: 6px 8px; }
}

@media (max-width: 360px) {
  .login-brand-panel { min-height: 232px; padding-right: 16px; padding-left: 16px; }
  .login-brand-mark { width: 58px; height: 58px; }
  .login-brand-copy h1 { font-size: 34px; }
  .login-brand-copy p { font-size: 11px; }
  .login-partner > span { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  #screen-login .login-input,
  #screen-login .btn-login,
  .app-install-button { transition: none; }
  .app-install-toolbar-target,
  .app-install-coachmark-icon,
  .app-install-coachmark-pointer { animation: none; }
}

/* =============================================
   メニュー画面
============================================= */
.menu-body    { flex: 1; padding: 24px 16px; max-width: 960px; width: 100%; margin: 0 auto; }
.menu-welcome { margin-bottom: 22px; }
.menu-welcome h2 { font-size: 18px; font-weight: 600; color: #222; }
.menu-welcome p  { font-size: 13px; color: #888; margin-top: 4px; }
.menu-grid { display: flex; flex-direction: column; gap: 18px; }
.menu-section { display: flex; flex-direction: column; gap: 10px; }
.menu-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.menu-section-title { font-size: 13px; font-weight: 700; color: #556070; }
.menu-section-note { font-size: 11px; color: #9aa3af; }
.menu-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.menu-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; padding: 22px 18px; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; gap: 8px; }
.menu-card:hover { border-color: #4f8ef7; box-shadow: 0 4px 16px rgba(79,142,247,0.12); transform: translateY(-2px); }
.menu-card.disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.menu-icon       { font-size: 30px; }
.menu-card-title { font-size: 15px; font-weight: 600; }
.menu-card-desc  { font-size: 12px; color: #888; line-height: 1.5; flex: 1; }
.menu-tag        { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 8px; width: fit-content; }
.tag-coming      { background: #f0f4ff; color: #5566aa; }
.tag-admin       { background: #fff0eb; color: #c04a1a; }
.menu-admin-panel { background:#fff; border:1px solid #e8e8e8; border-radius:14px; padding:14px; }
.menu-admin-head { display:flex; align-items:center; gap:10px; padding:2px 2px 12px; border-bottom:1px solid #f0f2f5; }
.menu-admin-icon { font-size:24px; }
.menu-admin-title { font-size:15px; font-weight:700; color:#1a1a2e; }
.menu-admin-desc { font-size:12px; color:#888; margin-top:2px; }
.menu-admin-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:8px; padding-top:12px; }
.menu-admin-link { display:flex; align-items:center; gap:9px; width:100%; min-height:54px; border:1px solid #edf0f5; border-radius:8px; background:#fbfcfe; padding:9px 10px; text-align:left; cursor:pointer; transition:all .12s; }
.menu-admin-link:hover { border-color:#b8d0f8; background:#f6f9ff; }
.menu-admin-link.disabled { opacity:.45; cursor:not-allowed; pointer-events:none; }
.menu-admin-link-icon { font-size:18px; width:22px; text-align:center; flex-shrink:0; }
.menu-admin-link strong { display:block; font-size:13px; color:#1a1a2e; }
.menu-admin-link small { display:block; font-size:11px; color:#8a93a3; line-height:1.35; margin-top:2px; }
@media (max-width: 640px) {
  .menu-body { padding: 18px 12px; }
  .menu-card-grid, .menu-admin-grid { grid-template-columns:1fr; }
  .menu-card { padding: 18px 16px; }
}

/* =============================================
   得意先ポータル
============================================= */
.customer-portal-header,
#screen-search.customer-search-mode .page-header { background: var(--dcats-customer-green); }
.customer-portal-body { flex: 1; width: 100%; background: #f4f6f5; }
.customer-portal-inner { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.customer-portal-search-band { padding: 44px 0 40px; border-bottom: 1px solid #d9e2de; background: #fff; }
.customer-portal-search-layout { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(420px, 1.25fr); align-items: end; gap: 40px; }
.customer-portal-kicker { margin-bottom: 7px; color: #2f6d59; font-size: 12px; font-weight: 800; }
.customer-portal-heading h1 { color: #17231f; font-size: 28px; line-height: 1.25; letter-spacing: 0; }
.customer-portal-customer-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 12px; color: #42514b; }
.customer-portal-customer-line strong { overflow-wrap: anywhere; font-size: 14px; }
.customer-portal-status { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border: 1px solid #b8c7c1; border-radius: 6px; background: #f3f6f5; color: #596861; font-size: 11px; font-weight: 800; }
.customer-portal-status.active { border-color: #9bc8ae; background: #edf8f1; color: #23623f; }
.customer-portal-status.inactive { border-color: #e4b0a8; background: #fff3f1; color: #9b382b; }
.customer-portal-search-tools { display: grid; gap: 10px; min-width: 0; }
.customer-portal-preview-control { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
.customer-portal-preview-control label { color: #596861; font-size: 11px; font-weight: 800; white-space: nowrap; }
.customer-portal-preview-control select { width: 100%; min-width: 0; height: 38px; border: 1px solid #aebdb7; border-radius: 7px; padding: 0 34px 0 10px; background: #f8faf9; color: #17231f; font-size: 13px; outline: none; }
.customer-portal-preview-control select:focus { border-color: #287356; box-shadow: 0 0 0 3px rgba(40,115,86,.12); }
.customer-portal-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.customer-portal-search-form input { width: 100%; min-width: 0; height: 46px; border: 1px solid #aebdb7; border-radius: 7px; padding: 0 14px; background: #fff; color: #17231f; font-size: 15px; outline: none; }
.customer-portal-search-form input:focus { border-color: #287356; box-shadow: 0 0 0 3px rgba(40,115,86,.12); }
.customer-portal-search-button,
.customer-portal-list-button,
.customer-portal-account-button { min-height: 42px; border-radius: 7px; padding: 0 16px; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.customer-portal-search-button { height: 46px; border: 1px solid #245f49; background: #245f49; color: #fff; }
.customer-portal-list-button { height: 46px; border: 1px solid #b7c4bf; background: #fff; color: #31473e; }
.customer-portal-search-button:disabled,
.customer-portal-list-button:disabled { border-color: #d5dbd8; background: #e7ebe9; color: #8a9691; cursor: not-allowed; }
.customer-portal-info-band { padding: 30px 0 34px; border-bottom: 1px solid #dce2df; background: #f4f6f5; }
.customer-portal-info-band h2,
.customer-portal-account-band h2,
.customer-portal-guide-band h2 { margin-bottom: 13px; color: #36443e; font-size: 14px; letter-spacing: 0; }
.customer-portal-info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #cfd8d4; border-bottom: 1px solid #cfd8d4; }
.customer-portal-info-grid > div { min-width: 0; padding: 14px 16px; border-right: 1px solid #dbe2df; }
.customer-portal-info-grid > div:last-child { border-right: 0; }
.customer-portal-info-grid dt { color: #78847f; font-size: 11px; font-weight: 700; }
.customer-portal-info-grid dd { margin-top: 6px; overflow-wrap: anywhere; color: #1f2d27; font-size: 14px; font-weight: 800; }
.customer-portal-account-band { padding: 26px 0 40px; background: #fff; }
.customer-portal-guide-band { padding: 22px 0; border-bottom: 1px solid #dce2df; background: #fff; }
.customer-portal-guide-layout { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.customer-portal-guide-layout h2 { margin-bottom: 4px; }
.customer-portal-guide-layout p { color: #66736e; font-size: 11px; line-height: 1.5; }
.customer-portal-guide-button { min-height: 42px; flex: 0 0 auto; border: 1px solid #245f49; border-radius: 7px; padding: 0 18px; background: #245f49; color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.customer-portal-guide-button:hover { background: #1d513d; }
.customer-portal-account-layout { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.customer-portal-account-layout h2 { margin-bottom: 0; }
.customer-portal-account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.customer-portal-account-button { border: 1px solid #b7c4bf; background: #fff; color: #31473e; }
.customer-portal-search-button:hover { background: #1d513d; }
.customer-portal-list-button:hover,
.customer-portal-account-button:hover { border-color: #6f8f82; background: #f6faf8; }

.customer-shipping-body { flex: 1; min-height: 0; overflow-y: auto; background: #f4f6f5; }
.customer-shipping-toolbar-band { border-bottom: 1px solid #d5ddda; padding: 28px 0 24px; background: #fff; }
.customer-shipping-toolbar-layout { display: grid; grid-template-columns: minmax(240px, .55fr) minmax(700px, 1.45fr); align-items: end; gap: 28px; }
.customer-shipping-heading h1 { color: #17231f; font-size: 25px; letter-spacing: 0; }
.customer-shipping-heading p { margin-top: 7px; color: #66736e; font-size: 11px; line-height: 1.6; }
.customer-shipping-filters { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; align-items: end; gap: 8px; }
.customer-shipping-filters label { display: grid; gap: 5px; color: #596861; font-size: 11px; font-weight: 800; }
.customer-shipping-filters select { width: 100%; height: 42px; border: 1px solid #aebdb7; border-radius: 7px; padding: 0 32px 0 10px; background: #fff; color: #17231f; font-size: 13px; }
.customer-shipping-filters .customer-portal-list-button { height: 42px; }
.customer-shipping-list-band { padding: 24px 0 44px; }
.customer-shipping-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.customer-shipping-result-head h2 { color: #34433d; font-size: 14px; letter-spacing: 0; }
.customer-shipping-result-head span { color: #66736e; font-size: 11px; font-weight: 800; }
.customer-shipping-list { overflow: hidden; border: 1px solid #d4ddd9; border-radius: 7px; background: #fff; }
.customer-shipping-head,
.customer-shipping-row { display: grid; grid-template-columns: minmax(110px, .72fr) minmax(130px, .85fr) minmax(112px, .75fr) 88px 104px 104px minmax(230px, 1.45fr); }
.customer-shipping-head { min-height: 40px; border-bottom: 1px solid #d4ddd9; background: #eef3f1; color: #53625c; font-size: 11px; font-weight: 800; }
.customer-shipping-head span { display: flex; align-items: center; padding: 8px 12px; border-right: 1px solid #dce4e0; }
.customer-shipping-head span:last-child { border-right: 0; }
.customer-shipping-row { min-height: 68px; border-bottom: 1px solid #e5ebe8; color: #25332d; font-size: 12px; }
.customer-shipping-row:last-child { border-bottom: 0; }
.customer-shipping-cell { min-width: 0; padding: 12px; border-right: 1px solid #edf1ef; overflow-wrap: anywhere; line-height: 1.55; }
.customer-shipping-cell:last-child { border-right: 0; }
.customer-shipping-cell strong { color: #17231f; font-size: 13px; }
.customer-shipping-mobile-label { display: none; color: #78847f; font-size: 10px; font-weight: 800; }
.customer-shipping-empty { padding: 34px 18px; color: #78847f; font-size: 12px; text-align: center; }
.customer-shipping-empty.save-err { display: grid; justify-items: center; gap: 12px; }
.customer-shipping-retry { min-width: 112px; }
@media(max-width:900px){
  .customer-shipping-toolbar-layout { grid-template-columns: 1fr; gap: 18px; }
  .customer-shipping-head { display: none; }
  .customer-shipping-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-shipping-cell { border-bottom: 1px solid #edf1ef; }
  .customer-shipping-cell:nth-child(2n) { border-right: 0; }
  .customer-shipping-cell:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .customer-shipping-mobile-label { display: block; margin-bottom: 3px; }
}

.customer-users-body { min-height: calc(100vh - 52px); background: #f4f6f5; }
.customer-users-summary-band { border-bottom: 1px solid #d9e2de; padding: 20px 0; background: #fff; }
.customer-users-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.customer-users-summary > div { min-width: 0; }
.customer-users-summary span { display: block; color: #78847f; font-size: 11px; font-weight: 700; }
.customer-users-summary strong { display: block; margin-top: 4px; overflow-wrap: anywhere; color: #1f2d27; font-size: 18px; }
.customer-users-summary-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.customer-users-open-invite { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; border: 1px solid #245f49; border-radius: 8px; padding: 0 14px; background: #245f49; color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.customer-users-open-invite:hover { background: #1d503d; }
.customer-users-open-invite > span { display: inline; color: inherit; font-size: inherit; }
.customer-users-open-invite > span:first-child { font-size: 18px; font-weight: 500; line-height: 1; }
.customer-user-role-badge { display: inline-flex; align-items: center; min-height: 24px; border: 1px solid #b8c7c1; border-radius: 6px; padding: 2px 8px; background: #f3f6f5; color: #596861; font-size: 11px; font-weight: 800; white-space: nowrap; }
.customer-user-role-badge.admin { border-color: #d4b46a; background: #fff8e6; color: #745410; }
.customer-user-role-badge.member { border-color: #b8c7c1; background: #f3f6f5; color: #4f5e57; }
.customer-users-invite-band { border-bottom: 1px solid #cbded5; padding: 28px 0 30px; background: #eaf4ef; }
.customer-users-list-band { padding: 26px 0 44px; background: #f4f6f5; }
.customer-users-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.customer-users-section-head h1,
.customer-users-section-head h2 { margin: 0; color: #25322d; font-size: 17px; letter-spacing: 0; }
.customer-users-section-head p { margin: 4px 0 0; color: #69766f; font-size: 11px; line-height: 1.5; }
.customer-users-invite-card { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr); align-items: start; gap: 34px; border: 2px solid #2f765b; border-radius: 14px; padding: 24px; background: #fff; box-shadow: 0 10px 28px rgba(37, 96, 73, .1); }
.customer-users-invite-card.is-highlighted { animation: customer-invite-highlight 1.35s ease-out; }
@keyframes customer-invite-highlight { 0%, 100% { box-shadow: 0 10px 28px rgba(37, 96, 73, .1); } 35% { box-shadow: 0 0 0 6px rgba(47, 118, 91, .2), 0 14px 34px rgba(37, 96, 73, .18); } }
.customer-users-invite-intro { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.customer-users-invite-icon { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; background: #245f49; color: #fff; font-size: 22px; line-height: 1; }
.customer-users-invite-eyebrow { display: block; margin-bottom: 6px; color: #287356; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.customer-users-invite-intro h1 { margin: 0; color: #18382b; font-size: 21px; letter-spacing: 0; line-height: 1.35; }
.customer-users-invite-intro p { margin: 8px 0 0; color: #66756e; font-size: 12px; line-height: 1.7; }
.customer-users-invite-form { display: grid; grid-template-columns: minmax(150px, .72fr) minmax(240px, 1.28fr); align-items: start; gap: 14px 12px; min-width: 0; }
.customer-users-invite-form label { display: grid; gap: 7px; min-width: 0; color: #374840; font-size: 11px; font-weight: 800; }
.customer-users-invite-form label > span { display: flex; align-items: center; gap: 7px; }
.customer-users-invite-form label em { border-radius: 4px; padding: 1px 5px; background: #fff0ed; color: #b93f2f; font-size: 9px; font-style: normal; font-weight: 900; }
.customer-users-invite-form input { width: 100%; min-width: 0; height: 46px; border: 1px solid #9fb5ab; border-radius: 8px; padding: 0 12px; background: #fff; color: #17231f; font-size: 14px; outline: none; box-sizing: border-box; }
.customer-users-invite-form input::placeholder { color: #9aa7a1; }
.customer-users-invite-form input:focus { border-color: #287356; box-shadow: 0 0 0 3px rgba(40,115,86,.12); }
.customer-users-invite-flow { grid-column: 1 / -1; display: grid; gap: 3px; border-left: 3px solid #74aa91; border-radius: 0 6px 6px 0; padding: 8px 10px; background: #f2f8f5; color: #52645b; }
.customer-users-invite-flow strong { color: #315c49; font-size: 10px; }
.customer-users-invite-flow span { font-size: 10px; line-height: 1.55; }
.customer-users-invite-form .btn-primary { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; background: #245f49; font-size: 14px; font-weight: 800; white-space: nowrap; }
.customer-users-invite-form .btn-primary:hover { background: #1d503d; }
.customer-users-invite-form .btn-primary > span:first-child { font-size: 18px; line-height: 1; }
.customer-users-invite-message { grid-column: 1 / -1; min-height: 18px; margin-top: -4px; }
.customer-users-list { overflow: hidden; border: 1px solid #d4ddd9; border-radius: 7px; background: #fff; }
.customer-users-list .loading,
.customer-users-list .empty { padding: 20px; }
.customer-user-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 10px 14px; padding: 13px 14px; border-top: 1px solid #e5ebe8; }
.customer-user-row:first-child { border-top: 0; }
.customer-user-identity { min-width: 0; }
.customer-user-identity strong { display: block; color: #1f2937; font-size: 13px; line-height: 1.4; }
.customer-user-identity span { display: block; margin-top: 2px; overflow-wrap: anywhere; color: #667085; font-size: 11px; line-height: 1.4; }
.customer-user-state { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.customer-user-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.customer-user-actions button { min-height: 30px; }
.customer-user-row-message { grid-column: 1 / -1; min-height: 0; }
.customer-catalog-exit { min-height: 32px; border: 1px solid #667085; border-radius: 6px; padding: 0 11px; background: #fff; color: #344054; font-size: 11px; font-weight: 800; cursor: pointer; }
.customer-catalog-exit:hover { background: #f2f4f7; }
.customer-catalog-body { flex: 1; min-height: 0; background: #f5f7f6; }
.customer-catalog-toolbar { border-bottom: 1px solid #d5ddda; background: #fff; }
.customer-catalog-order-preview-guide { border-bottom: 1px solid #b9d5c7; background: #eaf5ef; color: #24563f; }
.customer-catalog-order-preview-guide > div { display: flex; align-items: center; gap: 12px; min-height: 42px; padding-top: 8px; padding-bottom: 8px; }
.customer-catalog-order-preview-guide strong { flex: 0 0 auto; font-size: 11px; }
.customer-catalog-order-preview-guide span { min-width: 0; font-size: 10px; line-height: 1.5; }
.customer-catalog-toolbar-inner { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(520px, 1.3fr); align-items: end; gap: 28px; padding-top: 20px; padding-bottom: 20px; }
.customer-catalog-identity { display: flex; align-items: center; gap: 8px; min-width: 0; color: #66736e; font-size: 11px; font-weight: 700; }
.customer-catalog-identity strong { min-width: 0; overflow-wrap: anywhere; color: #17231f; font-size: 15px; }
.customer-catalog-search-form { display: grid; grid-template-columns: minmax(150px, .55fr) minmax(180px, 1fr) auto; gap: 8px; }
.customer-catalog-search-form input,
.customer-catalog-search-form select { width: 100%; min-width: 0; height: 42px; border: 1px solid #aebdb7; border-radius: 7px; padding: 0 12px; background: #fff; color: #17231f; font-size: 13px; outline: none; }
.customer-catalog-search-form select { padding-right: 30px; }
.customer-catalog-search-form input:focus,
.customer-catalog-search-form select:focus { border-color: #287356; box-shadow: 0 0 0 3px rgba(40,115,86,.12); }
.customer-catalog-search-form select[aria-invalid="true"] { border-color: #c2410c; background: #fff7ed; box-shadow: 0 0 0 3px rgba(194,65,12,.14); }
.customer-catalog-search-feedback { grid-column: 1 / -1; border-left: 3px solid #c2410c; padding: 7px 10px; background: #fff7ed; color: #9a3412; font-size: 12px; font-weight: 800; line-height: 1.45; }
.customer-catalog-search-feedback[hidden] { display: none; }
.customer-catalog-search-form .customer-portal-search-button { height: 42px; min-height: 42px; }
.customer-catalog-layout { display: grid; grid-template-columns: minmax(320px, 370px) minmax(0, 1fr); min-height: calc(100vh - 146px); background: #fff; }
.customer-catalog-results { min-width: 0; border-right: 1px solid #d9e1de; background: #f8faf9; }
.customer-catalog-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 14px; border-bottom: 1px solid #d9e1de; background: #eef3f1; }
.customer-catalog-section-head h1 { color: #25352f; font-size: 14px; letter-spacing: 0; }
.customer-catalog-section-head span { color: #66736e; font-size: 11px; font-weight: 800; white-space: nowrap; }
.customer-catalog-list { max-height: calc(100vh - 198px); overflow-y: auto; }
.customer-catalog-empty { padding: 44px 22px; color: #7d8984; font-size: 13px; line-height: 1.7; text-align: center; }
.customer-catalog-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; width: 100%; min-height: 104px; border: 0; border-bottom: 1px solid #e0e6e3; padding: 14px; background: #fff; color: #17231f; text-align: left; cursor: pointer; }
.customer-catalog-item:hover { background: #f3f8f5; }
.customer-catalog-item.selected { box-shadow: inset 4px 0 0 #287356; background: #eef7f2; }
.customer-catalog-item-media { display: flex; align-items: center; justify-content: center; width: 72px; aspect-ratio: 1; overflow: hidden; border: 1px solid #d9e1de; border-radius: 6px; background: #fff; color: #8a9691; font-size: 10px; }
.customer-catalog-item-media img { width: 100%; height: 100%; object-fit: contain; }
.customer-catalog-item-copy { min-width: 0; }
.customer-catalog-item-category { margin-bottom: 5px; color: #287356; font-size: 11px; font-weight: 800; }
.customer-catalog-item-pn { overflow-wrap: anywhere; color: #111b17; font-size: 15px; font-weight: 800; line-height: 1.3; }
.customer-catalog-item-sub { margin-top: 5px; overflow-wrap: anywhere; color: #5d6b65; font-size: 11px; line-height: 1.45; }
.customer-catalog-item-category,
.customer-catalog-item-pn,
.customer-catalog-item-sub { display: block; }
.customer-catalog-detail { min-width: 0; padding: 28px 30px 48px; background: #fff; }
.customer-catalog-detail-empty { display: grid; place-items: center; align-content: center; min-height: 420px; color: #78847f; text-align: center; }
.customer-catalog-detail-empty strong { color: #42514b; font-size: 16px; }
.customer-catalog-detail-empty span { margin-top: 7px; font-size: 12px; }
.customer-catalog-unavailable { gap: 16px; min-height: 360px; border: 1px solid #dce5e0; border-radius: 12px; padding: 32px 20px; background: #f8faf9; outline: none; }
.customer-catalog-unavailable .customer-catalog-unavailable-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0; border: 1px solid #b8d4c6; border-radius: 50%; background: #eaf3ee; color: #287356; font-family: Georgia, serif; font-size: 28px; font-style: italic; font-weight: 700; }
.customer-catalog-unavailable h2 { margin: 0; color: #253b30; font-size: 20px; line-height: 1.5; }
.customer-catalog-unavailable p { max-width: 440px; margin: 0; color: #65736c; font-size: 13px; line-height: 1.8; }
.customer-catalog-unavailable .btn-primary { margin-top: 6px; background: #256347; }
.customer-catalog-unavailable .btn-primary:hover { background: #194d36; }
.customer-catalog-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid #d8e1dd; }
.customer-catalog-detail-kicker { color: #287356; font-size: 11px; font-weight: 800; }
.customer-catalog-detail-head h2 { margin-top: 5px; overflow-wrap: anywhere; color: #15211c; font-size: 24px; line-height: 1.3; letter-spacing: 0; }
.customer-catalog-detail-gltek { flex: 0 0 auto; min-width: 160px; border-left: 3px solid #d99a2b; padding-left: 12px; }
.customer-catalog-detail-gltek span { display: block; color: #7b6a49; font-size: 10px; font-weight: 800; }
.customer-catalog-detail-gltek strong { display: block; margin-top: 4px; overflow-wrap: anywhere; color: #342c1e; font-size: 14px; }
.customer-catalog-detail-main { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 28px; margin-top: 24px; }
.customer-catalog-images { min-width: 0; }
.customer-catalog-image-kinds { display: flex; gap: 0; min-width: 0; margin-bottom: 8px; border-bottom: 1px solid #cbd9d2; }
.customer-catalog-image-kinds button { flex: 1 1 0; min-width: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 8px 3px; color: #50675b; font-size: 12px; font-weight: 700; cursor: pointer; }
.customer-catalog-image-kinds button[aria-selected="true"] { color: #176749; border-bottom-color: #176749; }
.customer-catalog-image-kinds button span { color: #748b80; font-size: 11px; }
.customer-catalog-image-main { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid #d9e1de; border-radius: 7px; background: #f8faf9; color: #87928e; font-size: 12px; }
.customer-catalog-image-main img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.customer-catalog-image-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 7px; }
.customer-catalog-image-thumb { aspect-ratio: 1; overflow: hidden; border: 1px solid #d9e1de; border-radius: 5px; padding: 0; background: #fff; cursor: pointer; }
.customer-catalog-image-thumb img { width: 100%; height: 100%; object-fit: contain; }
.customer-catalog-image-thumb.active { border-color: #287356; box-shadow: 0 0 0 1px #287356; }
.customer-catalog-facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-content: start; border-top: 1px solid #d9e1de; }
.customer-catalog-facts dt,
.customer-catalog-facts dd { min-width: 0; margin: 0; padding: 11px 12px; border-bottom: 1px solid #dfe5e2; }
.customer-catalog-facts dt { background: #f4f7f6; color: #68756f; font-size: 11px; font-weight: 800; }
.customer-catalog-facts dd { overflow-wrap: anywhere; color: #1c2a24; font-size: 13px; font-weight: 700; }
.customer-catalog-availability { margin-top: 20px; }
.customer-catalog-availability h3 { margin-bottom: 9px; color: #34433d; font-size: 13px; letter-spacing: 0; }
.customer-catalog-availability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.customer-catalog-availability-grid > .customer-catalog-loading { grid-column: 1 / -1; border: 1px solid #d9e1de; border-radius: 6px; background: #f8faf9; }
.customer-catalog-availability-kind { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 0; min-width: 0; overflow: hidden; border: 1px solid #cddbd5; border-left: 4px solid #3a8b69; border-radius: 6px; background: #fbfdfc; }
.customer-catalog-availability-kind.aftermarket_new { border-color: #c9d8e7; border-left-color: #417ca8; background: #fbfdff; }
.customer-catalog-availability-kind-title { padding: 8px 11px; border-bottom: 1px solid #dbe5e1; color: #236344; font-size: 12px; font-weight: 800; }
.customer-catalog-availability-kind.aftermarket_new .customer-catalog-availability-kind-title { border-bottom-color: #dce5ee; color: #315f84; }
.customer-catalog-availability-metrics { display: grid; grid-template-columns: minmax(82px, .7fr) minmax(130px, 1.3fr); }
.customer-catalog-availability-metrics.stock-only { grid-template-columns: 1fr; }
.customer-catalog-availability-metric { min-width: 0; padding: 10px 11px 11px; }
.customer-catalog-availability-metric + .customer-catalog-availability-metric { border-left: 1px solid #e0e7e4; }
.customer-catalog-availability-metric span { display: block; color: #6d7974; font-size: 10px; font-weight: 800; }
.customer-catalog-availability-metric strong { display: inline-block; margin-top: 3px; overflow-wrap: anywhere; color: #17231f; font-size: 20px; line-height: 1.25; letter-spacing: 0; }
.customer-catalog-availability-metric.stock strong { font-size: 28px; font-variant-numeric: tabular-nums; }
.customer-catalog-availability-metric small { margin-left: 4px; color: #68756f; font-size: 10px; font-weight: 700; }
.customer-catalog-availability-metric .customer-catalog-stock-breakdown { display: block; margin: 5px 0 0; line-height: 1.4; white-space: normal; word-break: keep-all; }
.customer-catalog-detail-section { margin-top: 28px; }
.customer-catalog-detail-section h3 { margin-bottom: 10px; color: #34433d; font-size: 14px; letter-spacing: 0; }
.customer-catalog-detail-section .vehicle-table { min-width: 720px; }
.customer-catalog-vehicle-section { border-top: 1px solid #d9e1de; border-bottom: 1px solid #d9e1de; }
.customer-catalog-vehicle-section summary { padding: 13px 4px; color: #34433d; font-size: 14px; font-weight: 800; cursor: pointer; }
.customer-catalog-vehicle-section summary:hover { color: #236344; }
.customer-catalog-vehicle-section[open] summary { border-bottom: 1px solid #d9e1de; }
.customer-catalog-vehicle-section .customer-catalog-table-wrap { border-top: 0; border-bottom: 0; }
.customer-catalog-table-wrap { overflow-x: auto; border-top: 1px solid #d9e1de; border-bottom: 1px solid #d9e1de; }
.customer-catalog-compatible-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #d9e1de; }
.customer-catalog-compatible { min-width: 0; border: 0; border-right: 1px solid #dfe5e2; border-bottom: 1px solid #dfe5e2; padding: 12px; background: #fff; color: #1e2b26; text-align: left; cursor: pointer; }
.customer-catalog-compatible:nth-child(2n) { border-right: 0; }
.customer-catalog-compatible:hover { background: #f3f8f5; }
.customer-catalog-compatible strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.customer-catalog-compatible-code { display: block; margin-top: 4px; overflow-wrap: anywhere; color: #6e7974; font-size: 10px; }
.customer-catalog-compatible-stock { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.customer-catalog-compatible-stock-item { display: inline-flex; align-items: baseline; gap: 3px; border: 1px solid #bcd9c9; border-radius: 5px; padding: 3px 6px; background: #f1f9f4; color: #236344; font-size: 10px; font-weight: 700; line-height: 1.35; }
.customer-catalog-compatible-stock-item.aftermarket_new { border-color: #c5d8e8; background: #f2f7fb; color: #315f84; }
.customer-catalog-compatible-stock-item b { color: inherit; font-size: 11px; font-variant-numeric: tabular-nums; }
.customer-catalog-loading { padding: 28px 0; color: #77837e; font-size: 12px; text-align: center; }
@media (max-width: 900px) {
  .customer-catalog-toolbar-inner { grid-template-columns: 1fr; align-items: stretch; gap: 12px; }
}
@media (max-width: 760px) {
  .customer-portal-header .header-username { display: none; }
  .customer-portal-header .page-header-right { flex-shrink: 1; }
  .customer-portal-inner { width: min(100% - 24px, 1080px); }
  .customer-portal-search-band { padding: 28px 0 26px; }
  .customer-portal-search-layout { grid-template-columns: 1fr; gap: 22px; }
  .customer-portal-heading h1 { font-size: 23px; }
  .customer-portal-preview-control { grid-template-columns: 1fr; gap: 6px; }
  .customer-portal-search-form { grid-template-columns: minmax(0, 1fr) auto; }
  .customer-portal-list-button { grid-column: 1 / -1; width: 100%; }
  .customer-portal-info-grid { grid-template-columns: 1fr 1fr; }
  .customer-portal-info-grid > div:nth-child(2) { border-right: 0; }
  .customer-portal-info-grid > div:nth-child(-n+2) { border-bottom: 1px solid #dbe2df; }
  .customer-users-invite-card { grid-template-columns: 1fr; gap: 22px; padding: 22px; }
  .customer-users-invite-form { grid-template-columns: 1fr 1fr; }
  .customer-users-invite-form .btn-primary { grid-column: 1 / -1; width: 100%; }
  .customer-user-row { grid-template-columns: minmax(180px, 1fr) auto; }
  .customer-user-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .customer-catalog-header .customer-catalog-exit,
  .customer-catalog-header .header-username { display: none; }
  .customer-catalog-toolbar-inner { grid-template-columns: 1fr; align-items: stretch; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
  .customer-catalog-order-preview-guide > div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .customer-catalog-search-form { grid-template-columns: minmax(0, 1fr) auto; }
  .customer-catalog-search-form select { grid-column: 1 / -1; grid-row: 1; }
  .customer-catalog-search-form input { grid-column: 1; grid-row: 2; }
  .customer-catalog-search-form .customer-portal-search-button { grid-column: 2; grid-row: 2; }
  .customer-catalog-layout { grid-template-columns: 1fr; min-height: 0; width: 100%; }
  .customer-catalog-results { border-right: 0; }
  .customer-catalog-list { max-height: 48vh; }
  .customer-catalog-detail { padding: 22px 16px 38px; border-top: 8px solid #edf1ef; }
  .customer-catalog-detail-head { display: grid; gap: 13px; }
  .customer-catalog-detail-head h2 { font-size: 20px; }
  .customer-catalog-detail-gltek { min-width: 0; }
  .customer-catalog-availability-grid { grid-template-columns: 1fr; }
  .customer-catalog-detail-main { grid-template-columns: 1fr; gap: 20px; }
  .customer-catalog-facts { grid-template-columns: 118px minmax(0, 1fr); }
  .customer-catalog-compatible-list { grid-template-columns: 1fr; }
  .customer-catalog-compatible { border-right: 0; }
}
@media (max-width: 420px) {
  .customer-portal-search-form { grid-template-columns: 1fr; }
  .customer-portal-search-button,
  .customer-portal-list-button { grid-column: 1; width: 100%; }
  .customer-portal-info-grid { grid-template-columns: 1fr; }
  .customer-portal-info-grid > div { border-right: 0; border-bottom: 1px solid #dbe2df; }
  .customer-portal-info-grid > div:last-child { border-bottom: 0; }
  .customer-portal-account-layout,
  .customer-portal-guide-layout,
  .customer-users-summary,
  .customer-users-section-head { align-items: stretch; flex-direction: column; }
  .customer-users-summary-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .customer-users-summary-actions .customer-user-role-badge { align-self: flex-start; }
  .customer-users-open-invite { width: 100%; }
  .customer-portal-account-actions { justify-content: stretch; }
  .customer-portal-account-actions button,
  .customer-portal-guide-button { width: 100%; }
  .customer-users-invite-card { gap: 18px; padding: 18px 15px; }
  .customer-users-invite-icon { flex-basis: 40px; width: 40px; height: 40px; font-size: 19px; }
  .customer-users-invite-intro h1 { font-size: 19px; }
  .customer-users-invite-form { grid-template-columns: 1fr; }
  .customer-users-invite-form .btn-primary { grid-column: 1; }
  .customer-user-row { grid-template-columns: 1fr; align-items: stretch; }
  .customer-user-actions { grid-column: 1; }
  .customer-catalog-availability-metrics { grid-template-columns: 90px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .customer-users-invite-card.is-highlighted { animation: none; }
}

@media(max-width:640px){
  .customer-shipping-toolbar-band { padding: 22px 0 18px; }
  .customer-shipping-filters { grid-template-columns: 1fr 1fr; }
  .customer-shipping-filters .customer-portal-list-button { grid-column: 1 / -1; width: 100%; }
}
@media(max-width:420px){
  .customer-shipping-filters,
  .customer-shipping-row { grid-template-columns: 1fr; }
  .customer-shipping-filters .customer-portal-list-button { grid-column: 1; }
  .customer-shipping-cell { border-right: 0; border-bottom: 1px solid #edf1ef; }
  .customer-shipping-cell:nth-child(2n) { border-right: 0; }
  .customer-shipping-cell:last-child { grid-column: 1; border-bottom: 0; }
}

/* =============================================
   検索画面
============================================= */
.badge-sl  { background: #e8f4ff; color: #1a6fd4; border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.icon-image { display: inline-block; width: 1em; height: 1em; flex: 0 0 auto; background-color: currentColor; -webkit-mask: url("assets/icons/image.svg?v=1.1.737") center / contain no-repeat; mask: url("assets/icons/image.svg?v=1.1.737") center / contain no-repeat; }
.badge-img { display: inline-flex; align-items: center; gap: 3px; background: #e8f7ee; color: #1a8c3e; border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-img .icon-image { width: 13px; height: 13px; }
.badge-img.no-image { background: #f1f3f6; color: #98a2b3; }
.badge-component { background: #fff4d6; color: #8a5a00; border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-kikan { background: #eef5ff; color: #1a6fd4; border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-catalog { background: var(--kind-catalog-bg); color: var(--kind-catalog-fg); border: 1px solid var(--kind-catalog-border); border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.product-kind-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.product-kind-list.compact { display: grid; grid-template-columns: 58px 68px; gap: 3px; margin-top: 4px; align-items: center; width: 129px; }
.product-kind-slot { min-width: 0; min-height: 18px; display: flex; align-items: center; }
.product-kind-slot.slot-empty { visibility: hidden; }
.product-kind-list.compact .product-kind-pill { width: 100%; justify-content: center; box-sizing: border-box; padding: 2px 5px; }
.product-kind-pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 700; line-height: 1.35; white-space: nowrap; border: 1px solid transparent; }
.product-kind-pill.rebuilt { background: var(--kind-rebuilt-bg); color: var(--kind-rebuilt-fg); border-color: var(--kind-rebuilt-border); }
.product-kind-pill.aftermarket_new { background: var(--kind-aftermarket-bg); color: var(--kind-aftermarket-fg); border-color: var(--kind-aftermarket-border); }
.product-kind-pill.used_core { background: #fff4d6; color: #8a5a00; border-color: #f0d184; }
.product-kind-pill.catalog_spec { background: var(--kind-catalog-bg); color: var(--kind-catalog-fg); border-color: var(--kind-catalog-border); }
.product-kind-pill.other { background: #f1f3f7; color: #556070; border-color: #dfe4ec; }
.product-kind-stock { font-weight: 600; opacity: .82; }
.product-kind-panel { border-top: 1px solid #f0f0f0; padding-top: 8px; margin-top: 8px; }
.product-kind-panel .product-kind-list { margin-top: 6px; }
.product-kind-control { margin-top: 8px; display: grid; gap: 6px; }
.product-kind-control-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.product-kind-control-row.compact { justify-content: flex-end; }
.product-kind-control-row label { color: #667085; font-size: 12px; font-weight: 700; white-space: nowrap; }
.product-kind-select { min-width: 150px; border: 1px solid #d7dce5; border-radius: 7px; padding: 6px 8px; font-size: 12px; background: #fff; font-weight: 800; text-align: right; text-align-last: right; }
.product-kind-select.rebuilt { background: var(--kind-rebuilt-bg); color: var(--kind-rebuilt-fg); border-color: var(--kind-rebuilt-border); }
.product-kind-select.aftermarket_new { background: var(--kind-aftermarket-bg); color: var(--kind-aftermarket-fg); border-color: var(--kind-aftermarket-border); }
.product-kind-select.used_core { background: #fff4d6; color: #8a5a00; border-color: #f0d184; }
.product-kind-select.catalog_spec { background: var(--kind-catalog-bg); color: var(--kind-catalog-fg); border-color: var(--kind-catalog-border); }
.product-kind-select.other { background: #f1f3f7; color: #556070; border-color: #dfe4ec; }
.product-kind-select option { background: #fff; color: #1a1a2e; font-weight: 700; }
.product-kind-select option.rebuilt { background: var(--kind-rebuilt-bg); color: var(--kind-rebuilt-fg); }
.product-kind-select option.aftermarket_new { background: var(--kind-aftermarket-bg); color: var(--kind-aftermarket-fg); }
.product-kind-select option.used_core { background: #fff4d6; color: #8a5a00; }
.product-kind-select option.catalog_spec { background: var(--kind-catalog-bg); color: var(--kind-catalog-fg); }
.product-kind-select option.other { background: #f1f3f7; color: #556070; }
.product-kind-stock-grid { display: grid; gap: 6px; margin-top: 6px; }
.product-kind-stock-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px; align-items: center; gap: 8px; width: 100%; padding: 0; background: transparent; }
.product-kind-stock-label { color: #667085; font-size: 12px; font-weight: 700; white-space: nowrap; }
.product-kind-stock-value { width: 72px; min-width: 0; box-sizing: border-box; border: 1px solid #edf0f5; border-radius: 7px; padding: 3px 6px; background: #fbfcff; font-size: 18px; font-weight: 800; color: #1a1a2e; white-space: nowrap; overflow: hidden; text-align: right; font-variant-numeric: tabular-nums; }
.product-kind-stock-row.rebuilt .product-kind-stock-value { background: var(--kind-rebuilt-bg); color: var(--kind-rebuilt-fg); border-color: var(--kind-rebuilt-border); }
.product-kind-stock-row.aftermarket_new .product-kind-stock-value { background: var(--kind-aftermarket-bg); color: var(--kind-aftermarket-fg); border-color: var(--kind-aftermarket-border); }
.product-kind-stock-row.used_core .product-kind-stock-value { background: #fff4d6; color: #8a5a00; border-color: #f0d184; }
.product-kind-stock-row.catalog_spec .product-kind-stock-value { background: var(--kind-catalog-bg); color: var(--kind-catalog-fg); border-color: var(--kind-catalog-border); }
.product-kind-stock-row.other .product-kind-stock-value { background: #f1f3f7; color: #556070; border-color: #dfe4ec; }
.product-kind-stock-value span { display: block; color: #8a94a6; font-size: 10px; font-weight: 600; margin-bottom: 2px; }
#screen-search .panel-topbar .btn-sm-edit,
#screen-production-search .panel-topbar .btn-sm-edit,
#screen-search .detail-toolbar .btn-sm-edit,
#screen-search .detail-inline-action,
#screen-search .catalog-vehicle-button,
#screen-production-search .detail-inline-action,
#screen-production-search .catalog-vehicle-button {
  height: 24px;
  min-height: 24px;
  min-width: 76px;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 6px;
  box-sizing: border-box;
}
#screen-search .panel-top-add,
#screen-production-search .panel-top-add { min-width: 104px; }
@media(max-width:720px){
  .detail-kind-price-row { grid-template-columns: 1fr; }
}
.btn-component-action { background: #fff4d6; color: #8a5a00; border-color: #f2d489; font-weight: 700; }
.btn-component-action:hover { background: #ffe9ad; border-color: #e7bf54; }
.component-icon { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; line-height: 1; }
.loading { text-align: center; padding: 40px; color: #aaa; }
.empty   { text-align: center; padding: 40px; color: #bbb; font-size: 13px; line-height: 1.8; }
.search-header { background: #fff; border-bottom: 1px solid var(--dcats-border); padding: var(--dcats-space-2) var(--dcats-space-4); flex-shrink: 0; }
.search-row    { display: flex; gap: var(--dcats-space-2); align-items: center; }
.search-input  { flex: 1; min-width: 0; height: var(--dcats-control-height-compact); border: 1px solid var(--dcats-border); border-radius: var(--dcats-control-radius); padding: 0 10px; font-size: var(--dcats-type-body); font-weight: 600; letter-spacing: .01em; outline: none; }
.search-input:focus { border-color: var(--dcats-focus); box-shadow: var(--dcats-focus-ring); }
.btn-search { min-height: var(--dcats-control-height-compact); border: 1px solid var(--dcats-brand-red); border-radius: var(--dcats-control-radius); padding: 0 var(--dcats-space-4); font-size: var(--dcats-type-body); cursor: pointer; font-weight: 700; white-space: nowrap; flex-shrink: 0; background: var(--dcats-brand-red); color: #fff; }
.btn-search:hover { background: var(--dcats-brand-red-hover); }
.clear-row  { margin-top: 6px; text-align: right; }
.btn-clear  { background: none; border: none; color: #aaa; font-size: 12px; cursor: pointer; text-decoration: underline; }
.filter-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--dcats-space-2); padding: var(--dcats-space-2) var(--dcats-space-4); background: #fff; border-bottom: 1px solid var(--dcats-border); flex-shrink: 0; }
.filter-row label { color: #667085; font-size: var(--dcats-type-supporting); font-weight: 700; white-space: nowrap; }
.filter-row .form-select { min-width: 0; min-height: var(--dcats-control-height-compact); border-color: var(--dcats-border); border-radius: var(--dcats-control-radius); padding: 6px 32px 6px 10px; font-size: var(--dcats-type-body); font-weight: 500; }
.filter-row .form-select:focus { border-color: var(--dcats-focus); box-shadow: var(--dcats-focus-ring); }
.search-count-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 4px 10px 4px 16px; background: #fafafa; border-bottom: 1px solid #eee; flex-shrink: 0; }
.search-count-row .count-bar { min-width: 0; flex: 1; padding: 0; background: transparent; border: 0; }
.search-clear-btn { min-height: var(--dcats-control-height-compact); padding: 4px 10px; border: 1px solid var(--dcats-border); border-radius: var(--dcats-control-radius); background: #fff; color: #667085; font-size: var(--dcats-type-supporting); font-weight: 700; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.search-clear-btn:hover:not(:disabled) { background: var(--dcats-brand-red-soft); border-color: #e58a96; color: #a50016; }
.search-clear-btn:focus-visible { outline: 2px solid var(--dcats-focus); outline-offset: 2px; }
.search-clear-btn:disabled { background: #f7f7f8; color: #a8adb7; border-color: #e1e3e8; cursor: default; opacity: .72; }
.chip       { border: 1px solid #d0d0d0; border-radius: 16px; padding: 4px 12px; font-size: 12px; cursor: pointer; background: #fff; color: #555; white-space: nowrap; flex-shrink: 0; }
.chip.active { background: var(--dcats-brand-red); color: #fff; border-color: var(--dcats-brand-red); }
.count-bar  { padding: 6px 16px; font-size: 13px; font-weight: 600; color: #888; background: #fafafa; border-bottom: 1px solid #eee; flex-shrink: 0; }
.list-area  { flex: 1; overflow-y: auto; }
.list       { padding: 8px; }
.load-more-wrap { padding: 8px; }
.btn-load-more { width: 100%; border: 1px solid #d7dce5; border-radius: 8px; background: #fff; color: #315f9f; font-weight: 700; font-size: 13px; padding: 10px; cursor: pointer; }
.btn-load-more:hover { background: #f5f8ff; border-color: #9bbcf5; }
.card        { background: #fff; border-radius: 10px; border: 1px solid #e8e8e8; margin-bottom: 8px; padding: 12px 14px; cursor: pointer; overflow: hidden; transition: border-color .15s; }
.card:hover  { border-color: #b8d0f8; }
.card.selected { border-color: var(--dcats-brand-red); background: var(--dcats-brand-red-soft); }
.card-top    { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-media { width: 56px; flex-shrink: 0; margin-right: 4px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.card-thumb  { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex-shrink: 0; margin-right: 4px; background: #fff; display: flex; align-items: center; justify-content: center; }
.card-media .card-thumb { margin-right: 0; }
.card-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; image-rendering: auto; }
.card-thumb-empty { display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 22px; }
.card-thumb-icon { flex-direction: column; border: 1px solid #e3e8f2; color: #8a94a6; font-size: 18px; font-weight: 800; line-height: 1.1; }
.card-thumb-icon.has-image { background: #eef7ff; color: #1a6fd4; border-color: #c8defa; }
.card-thumb-icon.no-image { background: #f6f7f9; color: #b5bcc8; border-color: #e5e8ee; }
.card-thumb-icon .icon-image { width: 24px; height: 24px; }
.card-thumb-icon .card-thumb-icon-label { display: block; margin-top: 4px; font-size: 10px; font-weight: 700; }
.card-media-catalog { display: flex; justify-content: center; }
.card-media-catalog .badge-catalog { width: 100%; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; padding: 1px 3px; font-size: 10px; line-height: 1.3; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.card-left   { flex: 1; min-width: 0; }
.card-name   { font-weight: 600; font-size: 14px; color: #1a1a2e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-pn     { font-size: 13px; color: #444; margin-top: 3px; font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-mfr    { font-size: 12px; color: #777; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub    { font-size: 11px; color: #aaa; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sl     { font-size: 11px; color: #1a6fd4; margin-top: 3px; font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badges      { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; flex-shrink: 0; }
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; }
.overlay.show { display: block; }
.panel { position: fixed; bottom: 0; left: 0; right: 0; height: 80vh; max-height: calc(100vh - 80px); background: #fff; border-radius: 16px 16px 0 0; z-index: 300; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .28s ease; }
.panel.show { transform: translateY(0); }
.panel-topbar { display: flex; align-items: center; padding: 10px 12px 10px 16px; flex-shrink: 0; border-bottom: 1px solid #f0f0f0; gap: 8px; }
.panel-topbar-title { font-size: 14px; font-weight: 600; color: #555; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-top-add { flex-shrink: 0; }
.panel-close-btn { background: #e8e8e8; border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #333; }
.panel-close-btn:active { background: #d0d0d0; }
.panel-scroll  { flex: 1; overflow: hidden; min-height: 0; }
.panel-inner   { display: flex; gap: 0; height: 100%; min-height: 0; }

/* 左カラム：部品情報・価格 */
.panel-left  { flex: 1; min-width: 0; min-height: 0; padding: 14px 16px 8px; overflow: hidden; display: flex; flex-direction: column; }

/* 右カラム：画像（常に一定幅を確保。画像なしでも空欄として表示） */
.panel-right {
  width: 180px; flex-shrink: 0;
  border-left: 1px solid #f0f0f0;
  background: #fafafa;
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 8px;
  align-self: flex-start;
  max-height: min(48vh, 390px);
  overflow: hidden;
  position: sticky;
  top: 0;
}
.panel-right-title { font-size: 12px; font-weight: 600; color: #888; margin-bottom: 4px; }
.panel-right-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; color: #ddd; font-size: 11px; gap: 6px; text-align: center; min-height: 120px; }
.panel-right-empty .empty-icon { display: flex; align-items: center; justify-content: center; font-size: 28px; }
.panel-right-empty .empty-icon .icon-image { width: 28px; height: 28px; }

.detail-table  { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.detail-table tr { border-bottom: 1px solid #f0f0f0; }
.detail-table td { padding: 7px 4px; font-size: 13px; vertical-align: top; }
.detail-table td:first-child { color: #888; width: 38%; }
.detail-table td:last-child  { font-weight: 500; word-break: break-all; }
.img-section-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }

/* 右カラムの画像グリッド（縦1列） */
.img-grid, #img-grid  { display: flex; flex-direction: column; gap: 8px; }
.panel-right #img-grid { overflow-y: auto; max-height: min(34vh, 270px); padding-right: 2px; }
.img-wrap  { position: relative; border-radius: 8px; overflow: hidden; background: #fff; aspect-ratio: 1; width: 100%; display: flex; align-items: center; justify-content: center; }
.img-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; image-rendering: auto; }
.sales-mobile-stock { display: none; }
.panel-footer { flex-shrink: 0; padding: 8px 10px 16px; border-top: 1px solid #eee; background: #fafafa; width: 180px; flex-shrink: 0; }
.upload-btn-small { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; background: #4f8ef7; color: #fff; border: none; border-radius: 8px; padding: 8px 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.upload-btn-small:active { background: #3a7ae0; }
.image-actions-open-btn { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; background: #4f8ef7; color: #fff; border: none; border-radius: 8px; padding: 8px 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.image-actions-open-btn:active { background: #3a7ae0; }
.image-actions-list { display: grid; gap: 10px; margin-top: 10px; }
.image-kind-picker { display: grid; gap: 5px; margin: 10px 0 4px; }
.image-kind-picker label { color: #667085; font-size: 12px; font-weight: 700; }
.image-kind-picker select { width: 100%; min-width: 0; }
.image-upload-review-card { box-sizing: border-box; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; }
.image-upload-review-list { display: grid; gap: 8px; min-height: 0; overflow-y: auto; padding: 2px; }
.image-upload-review-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border: 1px solid #e2e8e5; border-radius: 7px; background: #f8faf9; }
.image-upload-review-preview { display: flex; align-items: center; justify-content: center; width: 72px; aspect-ratio: 1; overflow: hidden; border-radius: 5px; background: #e7eeea; }
.image-upload-review-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-upload-review-detail { display: grid; gap: 8px; min-width: 0; }
.image-upload-review-name { overflow-wrap: anywhere; color: #25364a; font-size: 12px; font-weight: 700; }
.image-upload-review-customer { display: flex; align-items: center; gap: 6px; color: #263c31; font-size: 12px; font-weight: 700; }
.image-upload-review-customer input { width: 15px; height: 15px; accent-color: #287356; }
.image-upload-review-card .form-footer { flex: 0 0 auto; margin-top: 12px; }
.image-upload-review-card .btn-primary:disabled { opacity: .6; cursor: wait; }
.image-action-btn { width: 100%; min-height: 42px; border-radius: 8px; border: 1px solid #d8e2f1; background: #fff; color: #1f2a44; font-size: 13px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.image-action-btn.primary { background: #4f8ef7; border-color: #4f8ef7; color: #fff; }
.image-action-btn.danger { border-color: #f0b8b8; color: #d33; }
.image-action-btn:active { transform: translateY(1px); }
.image-delete-open-btn { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; background: #fff; color: #d33; border: 1px solid #f0b8b8; border-radius: 8px; padding: 8px 6px; font-size: 12px; font-weight: 600; cursor: pointer; margin-top: 12px; }
.image-delete-open-btn:active { background: #fff3f3; }
.image-delete-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 12px; padding: 10px; border: 1px solid #f0d0d0; border-radius: 10px; background: #fff8f8; }
.image-delete-select-all { display: inline-flex; align-items: center; gap: 6px; color: #5b667a; font-size: 12px; font-weight: 700; cursor: pointer; }
.image-delete-select-all input { width: 16px; height: 16px; }
.image-delete-bulk-btn { border: 1px solid #ff5a5a; background: #fff; color: #d33; border-radius: 7px; padding: 7px 10px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.image-delete-bulk-btn:disabled { opacity: .45; cursor: not-allowed; }
.image-delete-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; max-height: 58vh; overflow-y: auto; padding: 4px 2px; }
.image-delete-item { border: 1px solid #eee; border-radius: 8px; background: #fafafa; padding: 8px; }
.image-delete-check { display: inline-flex; align-items: center; gap: 5px; color: #5b667a; font-size: 11px; font-weight: 700; margin-bottom: 7px; cursor: pointer; }
.image-delete-check input { width: 15px; height: 15px; }
.image-delete-preview { aspect-ratio: 1; background: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 10px; }
.image-delete-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.image-delete-btn { width: 100%; border: 1px solid #ff5a5a; background: #fff; color: #e03a3a; border-radius: 6px; padding: 7px 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.image-delete-btn:active { background: #fff0f0; }
.image-edit-list { display: grid; gap: 12px; max-height: 58vh; overflow-y: auto; padding: 4px 2px; }
.image-edit-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: end; margin: 10px 0 12px; padding: 10px; border: 1px solid #e6edf7; border-radius: 10px; background: #f8fbff; }
.image-edit-field { display: grid; gap: 5px; min-width: 0; }
.image-edit-field label { color: #667085; font-size: 12px; font-weight: 700; }
.image-edit-field select { width: 100%; min-width: 0; }
.image-edit-bulk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-width: 0; }
.image-edit-bulk button { white-space: nowrap; }
.image-edit-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; border: 1px solid #e7edf7; border-radius: 8px; background: #fbfcff; padding: 8px; }
.image-edit-preview { width: 84px; aspect-ratio: 1; background: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.image-edit-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.image-edit-controls { display: grid; gap: 5px; }
.image-edit-controls label { color: #667085; font-size: 12px; font-weight: 700; }
.image-edit-controls select { width: 100%; min-width: 0; }
.image-edit-controls .image-edit-customer { display: flex; align-items: center; gap: 6px; color: #263c31; }
.image-edit-customer input { width: 15px; height: 15px; accent-color: #287356; }
@media (max-width: 560px) {
  .image-edit-toolbar { grid-template-columns: 1fr; }
  .image-edit-bulk { grid-template-columns: 1fr; }
}
.upload-btn   { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #4f8ef7; color: #fff; border: none; border-radius: 10px; padding: 14px; font-size: 15px; font-weight: 600; cursor: pointer; }
.upload-btn:active { background: #3a7ae0; }
.upload-btn.busy   { opacity: 0.5; pointer-events: none; }
.upload-input { display: none; }
@media (max-width: 767px) {
  #screen-search .panel { height: calc(100vh - 16px); height: calc(100dvh - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .panel-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .panel-inner { flex-direction: column; min-height: 100%; height: auto; }
  .panel-left { order: 1; flex: 0 0 auto; overflow: visible; padding: 12px 14px 8px; }
  .panel-right {
    order: 2;
    width: auto;
    border-left: 0;
    border-top: 1px solid #f0f0f0;
    padding: 8px 14px 10px;
    gap: 6px;
    align-self: stretch;
    max-height: none;
    overflow: visible;
    position: static;
    flex: 0 0 auto;
  }
  #screen-search .sales-mobile-stock { display: none !important; }
  .sales-mobile-stock .core-qty-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 0; }
  .sales-mobile-stock .core-qty-card { padding: 8px 7px; }
  .sales-mobile-stock .core-qty-label { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sales-mobile-stock .core-qty-value { font-size: 20px; }
  .sales-mobile-stock .core-qty-sub { display: none; }
  #screen-search .detail-main-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 8px; align-items: start; }
  #screen-search .detail-main-grid .detail-column { min-width: 0; }
  #screen-search .detail-main-grid .detail-vehicle-grid { grid-template-columns: 72px minmax(0, 1fr); }
  #screen-search .detail-main-grid .ac-part-row { grid-template-columns: 72px minmax(0, 1fr); }
  #screen-search .detail-main-grid .detail-vehicle-label,
  #screen-search .detail-main-grid .detail-vehicle-value,
  #screen-search .detail-main-grid .ac-part-label,
  #screen-search .detail-main-grid .ac-part-value { font-size: 11px; padding: 6px 3px; min-height: 31px; }
  #screen-search .detail-main-grid .detail-vehicle-value,
  #screen-search .detail-main-grid .ac-part-value { min-width: 0; overflow: hidden; word-break: keep-all; overflow-wrap: normal; }
  #screen-search .detail-main-grid .catalog-vehicle-maker-value,
  #screen-search .detail-main-grid .ac-part-value-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
  #screen-search .detail-main-grid .detail-vehicle-maker-row .catalog-vehicle-button,
  #screen-search .detail-main-grid #btn-open-components { display: none; }
  #screen-search .detail-main-grid .ac-part-value-with-action { justify-content: flex-start; }
  #screen-search .detail-main-grid .catalog-vehicle-button { padding: 2px 5px; font-size: 10px; }
  #screen-search .detail-main-grid .detail-spec-block { margin-top: 8px; }
  #screen-search .detail-mobile-actions { display: flex; gap: 6px; margin: -2px 0 8px; }
  #screen-search .detail-mobile-actions .btn-sm-edit { flex: 1 1 0; min-width: 0; height: 26px; min-height: 26px; padding: 0 6px; font-size: 11px; }
  #screen-search .detail-kind-price-row { grid-template-columns: minmax(112px, .85fr) minmax(0, 1.15fr); gap: 8px; align-items: stretch; }
  #screen-search .detail-kind-price-row .product-kind-panel,
  #screen-search .detail-kind-price-row .sales-price-summary-block { min-height: 72px; padding: 8px; }
  #screen-search .detail-kind-price-row .ec-mall-summary-block { grid-column: 1 / -1; min-height: 80px; padding: 8px; }
  #screen-search .detail-kind-price-row .product-kind-control { flex: 0 0 auto; margin-top: 4px; }
  #screen-search .detail-kind-price-row .product-kind-control-row.compact { justify-content: stretch; }
  #screen-search .detail-kind-price-row .product-kind-select { width: 100%; min-width: 0; padding: 6px 7px; }
  #screen-search .detail-kind-price-row .sales-price-summary-value { font-size: 16px; }
  #screen-search .detail-kind-price-row .product-kind-stock-grid { display: grid; gap: 4px; margin-top: 6px; }
  #screen-search .detail-kind-price-row .product-kind-stock-row { grid-template-columns: minmax(0, 1fr) 54px; gap: 5px; }
  #screen-search .detail-kind-price-row .product-kind-stock-label { font-size: 10px; }
  #screen-search .detail-kind-price-row .product-kind-stock-value { width: 54px; font-size: 15px; padding: 2px 5px; border-radius: 6px; }
  #screen-search .detail-inline-kind-panel { width: 100%; min-width: 0; margin-left: 0; margin-top: 6px; padding: 7px; }
  #screen-search .detail-inline-kind-panel .product-kind-select { width: 100%; min-width: 0; padding: 6px 7px; }
  #screen-search .detail-inline-kind-panel .product-kind-stock-grid { max-width: none; margin-left: 0; gap: 4px; }
  #screen-search .detail-inline-kind-panel .product-kind-stock-row { grid-template-columns: minmax(0, 1fr) 54px; gap: 5px; }
  #screen-search .detail-inline-kind-panel .product-kind-stock-label { font-size: 10px; }
  #screen-search .detail-inline-kind-panel .product-kind-stock-value { width: 54px; font-size: 15px; padding: 2px 5px; border-radius: 6px; }
  .panel-right-title { margin-bottom: 0; }
  .panel-right-empty { min-height: 42px; flex: 0 0 auto; flex-direction: row; justify-content: flex-start; }
  .panel-right-empty .empty-icon { font-size: 20px; }
  #img-grid {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 64px;
    padding-bottom: 2px;
  }
  .img-wrap {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    aspect-ratio: auto;
    border: 1px solid #eee;
  }
  #panel-footer {
    margin-top: 4px !important;
    padding-top: 6px !important;
    display: flex;
    gap: 8px;
  }
  .upload-btn-small,
  .image-delete-open-btn {
    margin-top: 0;
    padding: 7px 6px;
    font-size: 11px;
  }
}

/* Sales management product workspace */
#screen-search .card-pn,
#screen-search .card-sl,
#screen-search .kikan-pn,
#screen-search .component-pn,
#screen-search .component-alt-item strong,
#screen-search [data-dcats-inline-style="s-7b8c3df56487"],
#screen-production-search .kikan-pn,
#screen-production-search .component-pn,
#screen-production-search .component-alt-item strong {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
#screen-search .list { padding: 7px; }
#screen-search .card { margin-bottom: 6px; border-color: var(--dcats-border); border-radius: var(--dcats-card-radius); padding: 9px 10px; }
#screen-search .card.selected { border-color: #e58a96; box-shadow: inset 3px 0 0 var(--dcats-brand-red); }
#screen-search .card:focus-visible { border-color: var(--dcats-focus); outline: 2px solid var(--dcats-focus); outline-offset: 2px; box-shadow: var(--dcats-focus-ring); }
#screen-search .card-pn-primary { margin-top: 0; color: #172033; font-size: 16px; font-weight: 800; line-height: 1.35; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
#screen-search .card-name { margin-top: 3px; color: #526173; font-size: 12px; font-weight: 700; line-height: 1.4; }
#screen-search .card-mfr { color: #667085; font-size: 12px; line-height: 17px; }
#screen-search .card-left { display: grid; grid-template-rows: 22px 18px 17px 36px; }
#screen-search .card-pn-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
#screen-search .card-pn-row > .card-pn { flex: 1 1 auto; min-width: 0; margin-top: 0; }
#screen-search .card-left > .card-mfr { margin-top: 0; }
#screen-search .card-document-badges { display: grid; grid-template-columns: 54px 24px; gap: 4px; width: 82px; height: 18px; flex: 0 0 auto; }
#screen-search .card-kind-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; height: 36px; padding-top: 4px; box-sizing: border-box; min-width: 0; }
#screen-search .card-kind-cell { display: grid; grid-template-columns: minmax(0, 1fr) 64px; align-items: center; gap: 4px; min-width: 0; height: 32px; padding: 0 6px; box-sizing: border-box; border: 1px solid; border-radius: 5px; }
#screen-search .card-kind-cell.rebuilt { background: var(--kind-rebuilt-bg); color: var(--kind-rebuilt-fg); border-color: var(--kind-rebuilt-border); }
#screen-search .card-kind-cell.aftermarket_new { background: var(--kind-aftermarket-bg); color: var(--kind-aftermarket-fg); border-color: var(--kind-aftermarket-border); }
#screen-search .card-kind-cell.slot-empty { visibility: hidden; }
#screen-search .card-kind-name { height: 18px; line-height: 18px; font-size: 11px; font-weight: 700; white-space: nowrap; }
#screen-search .card-kind-photo-slot { width: 64px; height: 18px; }
#screen-search .card-kind-photo { display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: 64px; height: 18px; padding: 0 2px; box-sizing: border-box; border: 1px solid; border-color: inherit; border-radius: 3px; background: #fff; font-size: 10px; font-weight: 600; line-height: 16px; white-space: nowrap; }
#screen-search .card-kind-photo .icon-image { width: 10px; height: 10px; }
#screen-search .card-media-catalog,
#screen-search .card-media-sl { display: flex; justify-content: center; height: 18px; }
#screen-search .card-media-catalog .badge-catalog,
#screen-search .card-media-sl .badge-sl { width: 100%; height: 18px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; padding: 0 3px; font-size: 10px; line-height: 16px; background: var(--kind-catalog-bg); color: var(--kind-catalog-fg); border: 1px solid var(--kind-catalog-border); }
#screen-search .card-category-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
#screen-search .card-category-row .card-name { flex: 1 1 auto; min-width: 0; margin-top: 0; }
#screen-search .card-category-row .card-badges-inline { display: flex; flex-direction: row; flex: 0 0 auto; align-items: center; gap: 3px; width: auto; height: 18px; margin-top: 0; }
#screen-search .card-category-row .badge-slot { flex: 0 0 auto; min-height: 18px; }
#screen-search .card-category-row .badge-slot.slot-empty { display: none; }
#screen-search .card-category-row .badge-slot > span { width: auto; height: 18px; padding: 1px 4px; font-size: 10px; line-height: 14px; }
#screen-search .card-reference-row { display: flex; flex: 0 1 auto; max-width: 45%; gap: 6px; min-width: 0; overflow: hidden; }
#screen-search .card-reference-row > span { flex: 1 1 0; min-width: 0; margin-top: 0; font-size: 10px; line-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#screen-search .panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  background: #fff;
}
#screen-search .panel-scroll { overflow-y: auto; }
#screen-search .sales-product-identity {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 10px 16px;
  border-bottom: 1px solid #dfe5ec;
  background: #fff;
}
.sales-product-identity-copy { min-width: 0; }
.sales-product-identity h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.sales-product-category { margin-top: 6px; color: #344054; font-size: var(--dcats-type-body); font-weight: 800; }
.sales-product-id { margin-top: 3px; color: #667085; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.sales-product-edit { flex: 0 0 auto; min-height: 32px; }
.sales-product-status { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.sales-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #d0d5dd;
  border-radius: var(--dcats-control-radius);
  padding: 2px var(--dcats-space-2);
  background: #f8fafc;
  color: #475467;
  font-size: var(--dcats-type-supporting);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.sales-status-badge.kind.rebuilt { border-color: var(--kind-rebuilt-border); background: var(--kind-rebuilt-bg); color: var(--kind-rebuilt-fg); }
.sales-status-badge.kind.aftermarket_new { border-color: var(--kind-aftermarket-border); background: var(--kind-aftermarket-bg); color: var(--kind-aftermarket-fg); }
.sales-status-badge.kind.catalog_spec { border-color: var(--kind-catalog-border); background: var(--kind-catalog-bg); color: var(--kind-catalog-fg); }
.sales-status-badge.stock.available { border-color: #a6d8b7; background: #ecfdf3; color: #087443; }
.sales-status-badge.stock.empty { border-color: #d0d5dd; background: #f2f4f7; color: #667085; }
.sales-status-badge.stock.unknown { border-color: #d0d5dd; background: #f8fafc; color: #98a2b3; }
.sales-status-badge.core.required { border-color: #f1b8b2; background: #fff1ed; color: #b42318; }
.sales-status-badge.core.not-required { border-color: #a6d8b7; background: #ecfdf3; color: #087443; }
.sales-status-badge.warning { border-color: #efcc78; background: #fff8e6; color: #8a5a00; }

#screen-search .panel-left {
  grid-column: 1;
  grid-row: 3;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #fff;
}
.sales-detail-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: stretch;
  min-width: 0;
  min-height: 43px;
  overflow-x: auto;
  border-bottom: 1px solid #dfe5ec;
  background: #fff;
  scrollbar-width: thin;
}
.sales-detail-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 43px;
  min-height: 43px;
  box-sizing: border-box;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 9px 13px 7px;
  background: transparent;
  color: #667085;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
}
.sales-detail-tab:hover { background: #f7f9fc; color: #344054; }
.sales-detail-tab.active { border-bottom-color: #326fd1; color: #174ea6; }
.sales-detail-tab:focus-visible { outline: none; background: #eef4ff; color: #174ea6; }
.sales-detail-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  min-height: 18px;
  margin-left: 5px;
  border-radius: 9px;
  padding: 1px 5px;
  background: #edf2f8;
  color: #526173;
  font-size: 9px !important;
  font-weight: 800 !important;
  line-height: 1;
}
.sales-detail-tab-count:empty { display: none; }
.sales-detail-tab.active .sales-detail-tab-count { background: #e6efff; color: #174ea6; }
.sales-detail-tab-panels { min-width: 0; }
.sales-detail-tab-panel { min-width: 0; padding: 10px 16px 12px; }
.sales-detail-tab-panel[hidden] { display: none !important; }
.sales-detail-table-state { min-height: 64px; overflow: auto; }
.sales-basic-compatible {
  container-type: inline-size;
  margin-top: 8px;
  border-top: 1px solid #dfe5ec;
  padding-top: 6px;
}
.sales-basic-compatible-head {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.sales-basic-compatible-head strong { color: #1f2937; font-size: 13px; font-weight: 800; }
.sales-basic-compatible-wrap {
  /* One header and three product rows; further matches stay in this list. */
  max-height: 200px;
  min-height: 48px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.sales-basic-compatible-wrap:focus-visible { outline: 2px solid var(--dcats-focus); outline-offset: 2px; }
.sales-basic-compatible-wrap .kikan-table { min-width: 520px; margin-bottom: 0; line-height: 18px; }
.sales-basic-compatible-wrap .kikan-table thead { position: sticky; top: 0; z-index: 1; }
.sales-basic-compatible-wrap .kikan-table th { box-sizing: border-box; height: 32px; padding: 6px; }
.sales-basic-compatible-wrap .kikan-table tbody tr { height: 56px; }
.sales-basic-compatible-wrap .kikan-table td { box-sizing: border-box; padding: 4px 6px; }
.sales-basic-compatible-wrap .kikan-table th:nth-child(1),
.sales-basic-compatible-wrap .kikan-table td:nth-child(1) { width: 28%; }
.sales-basic-compatible-wrap .kikan-table th:nth-child(3),
.sales-basic-compatible-wrap .kikan-table td:nth-child(3) { width: 172px; }
.sales-basic-compatible-wrap .kikan-stock-list { gap: 2px; }
.sales-basic-compatible-wrap .kikan-stock-pill { padding: 1px 4px; font-size: 12px; line-height: 18px; }
.sales-basic-compatible-wrap .kikan-stock-pill b { font-size: 12px; }
.sales-detail-empty { padding: 16px 4px; color: #98a2b3; font-size: 12px; line-height: 1.5; }
.sales-detail-component-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e5e7eb;
  padding: 4px 0 14px;
}
.sales-detail-component-entry strong { display: block; color: #1f2937; font-size: 13px; }
.sales-detail-component-entry span { display: block; margin-top: 4px; color: #667085; font-size: 11px; line-height: 1.5; }
.sales-detail-image-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px !important;
}
.sales-detail-image-grid .panel-right-empty { grid-column: 1 / -1; min-height: 92px; }
.sales-detail-image-group { min-width: 0; }
.sales-detail-image-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; margin-bottom: 8px; border-bottom: 1px solid #dfe5ec; padding-bottom: 6px; }
.sales-detail-image-group-head strong { color: #344054; font-size: 13px; font-weight: 800; }
.sales-detail-image-group.rebuilt .sales-detail-image-group-head strong { color: var(--kind-rebuilt-fg); }
.sales-detail-image-group.aftermarket_new .sales-detail-image-group-head strong { color: var(--kind-aftermarket-fg); }
.sales-detail-image-group-head span { color: #8a93a3; font-size: 11px; white-space: nowrap; }
.sales-detail-image-kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; min-width: 0; }
.sales-detail-image-kind-grid.empty { display: block; }
.sales-detail-image-empty { min-height: 80px; display: flex; align-items: center; justify-content: center; border: 1px dashed #d8dee8; color: #98a2b3; font-size: 12px; }
.sales-detail-image-kind-grid .img-wrap { border: 1px solid #e5e9f0; }
#screen-search #panel-footer {
  width: auto;
  margin-top: 12px !important;
  border-top: 1px solid #e5e7eb !important;
  padding: 10px 0 0 !important;
  background: transparent;
}
#screen-search #panel-footer .image-actions-open-btn { width: auto; min-width: 120px; padding: 8px 12px; }

#screen-search .sales-conditions-panel {
  --sales-condition-label-width: 76px;
  --sales-condition-field-gap: 8px;
  --dcats-type-heading: 20px;
  --dcats-type-body: 16px;
  --dcats-type-supporting: 14px;
  grid-column: 1;
  grid-row: 2;
  position: static;
  align-self: stretch;
  justify-self: stretch;
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 8px 20px;
  width: auto;
  max-height: none;
  height: auto;
  overflow: visible;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid var(--dcats-border);
  background: #f6f8fb;
}
.sales-conditions-title { grid-column: 1 / -1; grid-row: 1; margin: 0; color: var(--dcats-ink); font-size: var(--dcats-type-heading); font-weight: 800; }
#screen-search .sales-conditions-panel .detail-customer-section { grid-column: 1; grid-row: 2; min-width: 0; margin: 0; }
#screen-search .sales-conditions-panel .detail-customer-panel { gap: 0; border: 0; border-radius: 0; padding: 0; background: transparent; }
#screen-search .sales-conditions-panel .detail-customer-head {
  display: grid;
  grid-template-columns: var(--sales-condition-label-width) minmax(0, 1fr);
  gap: var(--sales-condition-field-gap);
  align-items: center;
  margin-bottom: 2px;
}
#screen-search .sales-conditions-panel .detail-customer-head label,
#screen-search .sales-conditions-panel .detail-customer-head > span { color: #667085; font-size: var(--dcats-type-supporting); font-weight: 700; }
#screen-search .sales-conditions-panel .detail-customer-head.static { align-items: baseline; }
#screen-search .sales-conditions-panel .detail-customer-head.static strong { color: #172033; font-size: var(--dcats-type-body); overflow-wrap: anywhere; }
#screen-search .sales-conditions-panel .detail-customer-select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border-color: var(--dcats-border);
  border-radius: var(--dcats-control-radius);
  padding: 5px 24px 5px 7px;
  color: #172033;
  font-size: var(--dcats-type-body);
  font-weight: 700;
}

/* Shared customer/internal component focus treatment. */
#screen-search .btn-search:focus-visible,
#screen-search .search-clear-btn:focus-visible,
#screen-customer-orders button:focus-visible,
#screen-customer-orders input:focus-visible,
#screen-customer-orders select:focus-visible,
#screen-customer-orders textarea:focus-visible {
  outline: 2px solid var(--dcats-focus);
  outline-offset: 2px;
}
#screen-search .sales-conditions-panel .detail-customer-select:focus { border-color: var(--dcats-focus); box-shadow: var(--dcats-focus-ring); }
#screen-search .sales-conditions-panel .detail-customer-price-focus {
  display: grid;
  grid-template-columns: var(--sales-condition-label-width) minmax(0, 1fr);
  gap: 2px var(--sales-condition-field-gap);
  align-items: center;
  border-top: 1px solid var(--dcats-border);
  padding-top: 4px;
}
.detail-customer-price-focus > span { display: block; color: #667085; font-size: var(--dcats-type-supporting); font-weight: 700; }
.detail-customer-price-focus > strong {
  display: block;
  margin-top: 0;
  color: #15703a;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
/* Keep the generic .empty placeholder's 40px padding out of this field row. */
#screen-search .sales-conditions-panel .detail-customer-price-focus.empty {
  padding: 7px 0 4px;
  text-align: left;
}
.detail-customer-price-focus.empty > strong {
  min-width: 0;
  color: #667085;
  font-size: var(--dcats-type-supporting);
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
.detail-customer-price-focus > small { display: block; grid-column: 2; margin-top: 0; color: #667085; font-size: var(--dcats-type-supporting); }
#screen-search .sales-conditions-panel .detail-customer-price-focus:not(.empty) {
  grid-template-columns: var(--sales-condition-label-width) minmax(0, max-content) max-content;
  justify-content: start;
}
#screen-search .sales-conditions-panel .detail-customer-price-focus:not(.empty) > strong {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  font-size: 24px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
#screen-search .sales-conditions-panel .detail-customer-price-focus:not(.empty) > small {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  text-align: left;
}
#screen-search .sales-conditions-panel .detail-customer-price-focus { min-height: 42px; }
#screen-search .sales-conditions-panel .detail-sales-term-value { font-size: 16px; }
.detail-customer-shipping-rule {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 3px 8px;
  align-items: center;
  margin-top: 6px;
  border-top: 1px solid var(--dcats-border);
  padding-top: 6px;
}
.detail-customer-shipping-rule > span { color: #667085; font-size: var(--dcats-type-supporting); font-weight: 700; }
.detail-customer-shipping-rule .sales-shipping-charge-value > strong { justify-self: end; border: 1px solid currentColor; border-radius: var(--dcats-control-radius); padding: 2px 6px; font-size: var(--dcats-type-supporting); font-weight: 800; line-height: 1.2; }
.detail-customer-shipping-rule > small { grid-column: 2; color: #667085; font-size: var(--dcats-type-supporting); line-height: 1.35; text-align: right; }
.detail-customer-shipping-rule.separate .sales-shipping-charge-value > strong { background: #fff8e6; color: #9a6700; }
.detail-customer-shipping-rule.free .sales-shipping-charge-value > strong { background: #eef9f1; color: #18743a; }
.detail-customer-shipping-rule.loading .sales-shipping-charge-value > strong { border-color: #c7d0dc; background: #f5f7fa; color: #667085; }
#screen-search .sales-conditions-panel .detail-customer-shipping-rule {
  grid-template-columns: var(--sales-condition-label-width) minmax(0, 1fr);
  column-gap: var(--sales-condition-field-gap);
}
#screen-search .sales-conditions-panel .detail-customer-shipping-rule .sales-shipping-charge-value > strong { justify-self: start; }
#screen-search .sales-conditions-panel .detail-customer-shipping-rule > small { grid-column: 1 / -1; text-align: left; }
#screen-search .sales-conditions-panel .detail-customer-shipping-rule.loading { padding: 4px 0; text-align: left; }
#sales-product-fields-home:empty { display: none; }
#screen-search .detail-customer-section #product-kind-wrap,
#screen-search .detail-customer-section #product-kind-stock-wrap { min-width: 0; }
#screen-search .detail-customer-section .detail-sales-term-row {
  grid-template-columns: var(--sales-condition-label-width) minmax(0, 1fr);
  gap: var(--sales-condition-field-gap);
  align-items: center;
  min-height: 34px;
  border-bottom: 0;
}
#screen-search .detail-customer-section .detail-sales-kind-row {
  border-top: 1px solid var(--dcats-border);
  padding-top: 2px;
  margin-bottom: 2px;
}
#screen-search .detail-customer-section .detail-sales-term-label {
  color: #667085;
  font-size: var(--dcats-type-supporting);
  font-weight: 700;
  line-height: 1.35;
}
#screen-search .detail-customer-section .detail-sales-term-value { padding: 4px 0; }
#screen-search .detail-customer-section .product-kind-select {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 4px 20px 4px 0;
  background-color: transparent;
  font-size: var(--dcats-type-body);
  text-align: left;
  text-align-last: left;
}
#screen-search .detail-customer-section .product-kind-stock-grid { max-width: none; margin: 0; }
#screen-search .detail-customer-section .product-kind-stock-value {
  display: block;
  width: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--dcats-ink);
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
#screen-search .detail-customer-section .detail-customer-price-focus {
  grid-template-columns: var(--sales-condition-label-width) minmax(0, 1fr);
  min-width: 0;
  padding-bottom: 4px;
  text-align: left;
}
#screen-search .detail-customer-section .detail-customer-price-focus > span { white-space: nowrap; }
#screen-search .sales-conditions-terms {
  grid-column: 1;
  grid-row: 3;
  width: 100%;
  margin-top: 0;
  border: 0;
  border-top: 1px solid var(--dcats-border);
  border-radius: 0;
  padding: 0;
  background: transparent;
}
#screen-search .sales-conditions-terms .detail-sales-term-row,
#screen-search .sales-conditions-terms .product-kind-stock-row,
#screen-search .sales-conditions-terms .core-return-policy-panel.vertical .core-return-policy-item {
  grid-template-columns: var(--sales-condition-label-width) minmax(0, 1fr);
  column-gap: var(--sales-condition-field-gap);
  min-height: 30px;
}
#screen-search .sales-conditions-terms .detail-sales-term-label,
#screen-search .sales-conditions-terms .detail-sales-term-value,
#screen-search .sales-conditions-terms .product-kind-stock-grid .product-kind-stock-row .product-kind-stock-value,
#screen-search .sales-conditions-terms .core-return-policy-panel.vertical .core-return-policy-item span,
#screen-search .sales-conditions-terms .core-return-policy-panel.vertical .core-return-policy-item strong {
  padding: 5px 0;
  font-size: 14px;
}
#screen-search .sales-conditions-terms .detail-sales-term-value .product-kind-select {
  padding: 3px 20px 3px 0;
  font-size: 16px;
}
#screen-search .sales-conditions-terms .core-return-policy-panel.vertical .core-return-policy-item strong.core-return-badge {
  margin-left: 0;
  padding: 2px 5px;
  font-size: 14px !important;
}
#screen-search .sales-shipping-estimate {
  grid-column: 2;
  grid-row: 2 / 4;
  min-width: 0;
  align-self: start;
  margin: 0;
  border: 1px solid #cbd8e8;
  border-radius: 6px;
  padding: 6px 8px;
  background: #f8fbff;
  font-size: 12px;
  line-height: 1.5;
}
#screen-search .sales-shipping-estimate > .detail-block-title {
  margin-bottom: 4px;
  color: #213b5b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: break-word;
}
.sales-shipping-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
  border-bottom: 1px solid #e5eaf0;
  padding-bottom: 4px;
}
.sales-shipping-profile > span { color: #667085; font-size: 12px; font-weight: 700; }
.sales-shipping-profile > strong {
  min-width: 0;
  color: #172033;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}
.sales-shipping-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
  border-radius: 5px;
  padding: 4px;
  background: #fff;
}
.sales-shipping-controls label { display: grid; min-width: 0; gap: 2px; }
.sales-shipping-controls label > span { color: #526173; font-size: 12px; font-weight: 700; line-height: 1.5; }
.sales-shipping-controls select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid #b8c4d4;
  border-radius: 5px;
  padding: 3px 22px 3px 6px;
  background: #fff;
  color: #172033;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}
.sales-shipping-size-control { grid-column: auto; }
.sales-shipping-method { margin: 4px 0 6px; color: #526173; }
.sales-shipping-method > summary,
.sales-shipping-island > summary,
#screen-search .sales-conditions-market > summary { cursor: pointer; font-size: 13px; line-height: 1.5; }
.sales-shipping-method > summary { color: #725313; font-weight: 700; }
.sales-shipping-method > summary:focus-visible,
.sales-shipping-island > summary:focus-visible,
#screen-search .sales-conditions-market > summary:focus-visible { outline: 2px solid var(--dcats-focus); outline-offset: 2px; }
.sales-shipping-message {
  margin: 8px 0;
  border-left: 3px solid #8ba3bd;
  padding: 7px 8px;
  background: #eef4fa;
  color: #526173;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: pretty;
}
.sales-shipping-message.manual { border-left-color: #d49a28; background: #fff8e6; color: #7a5600; }
.sales-shipping-message.warning,
.sales-shipping-message.error { border-left-color: #d92d20; background: #fff1ed; color: #b42318; }
.sales-shipping-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  min-height: 32px;
  margin-top: 6px;
  border-top: 1px solid #d9e1eb;
  padding-top: 5px;
}
.sales-shipping-result > span { color: #526173; font-size: 12px; font-weight: 700; }
.sales-shipping-result > div { display: flex; flex-wrap: wrap; min-width: 0; align-items: center; justify-content: flex-end; gap: 4px 6px; margin-left: auto; }
.sales-shipping-result .shipping-rate-fee { color: #15703a; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
#screen-search .sales-shipping-estimate .shipping-rate-fee { font-size: 18px; }
.sales-shipping-result.pending { display: block; min-height: 0; color: #667085; font-size: 13px; }
#screen-search .sales-shipping-estimate .shipping-rate-tax-label { margin: 0; font-size: 12px; line-height: 1.5; }
#screen-search .sales-shipping-estimate .shipping-rate-fee.pending { font-size: 13px; white-space: normal; }
.sales-shipping-island {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding: 4px 6px;
  background: #fff;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
  word-break: normal;
  text-wrap: pretty;
}
.sales-shipping-island > span { min-width: 0; overflow-wrap: anywhere; }
details.sales-shipping-island { display: block; }
details.sales-shipping-island > span { display: block; margin-top: 6px; }
.sales-shipping-island .shipping-rate-fee { color: #344054; font-size: 14px; font-weight: 800; white-space: nowrap; }
.sales-shipping-island .shipping-rate-tax-label { margin-left: 4px; }
#screen-search .sales-conditions-market {
  grid-column: 1 / -1;
  grid-row: 4;
  min-width: 0;
  min-height: 0;
  margin-top: 0;
  border: 1px solid #cbd8e8;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}
#screen-search .sales-conditions-market .detail-block-title { color: #344054; font-size: 12px; }
#screen-search .sales-conditions-market > summary { max-width: 100%; padding: 4px 0; font-size: 12px; line-height: 1.4; }
#screen-search .sales-conditions-market[open] { padding-bottom: 4px; }
#screen-search .sales-conditions-market[open] > summary { margin-bottom: 4px; border-bottom: 1px solid #edf0f5; }
#screen-search .sales-conditions-market .ec-mall-detail-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 4px; font-size: 12px; line-height: 1.35; }
#screen-search .sales-conditions-market .ec-mall-detail-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 6px; align-content: start; min-width: 0; max-width: 420px; border: 1px solid #e5edf8; border-radius: 3px; padding: 3px 6px; background: #f8fbff; }
#screen-search .sales-conditions-market .ec-mall-detail-row:first-child { padding-top: 3px; }
#screen-search .sales-conditions-market .ec-mall-detail-price { grid-column: 2; grid-row: 1; }
#screen-search .sales-conditions-market .ec-mall-detail-seller { grid-column: 1 / -1; grid-row: 2; }
#screen-search .sales-conditions-market .ec-mall-detail-type,
#screen-search .sales-conditions-market .ec-mall-detail-seller { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
#screen-search .sales-conditions-market .ec-mall-detail-seller a { color: #1a6fd4; text-underline-offset: 2px; }
#screen-search .sales-conditions-market .ec-mall-detail-price { font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
#screen-search .sales-conditions-market .ec-mall-detail-meta { margin-top: 4px; color: #667085; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
#screen-search .sales-conditions-without-shipping .sales-conditions-terms { grid-column: 2; grid-row: 2; }
#screen-search .sales-conditions-without-shipping .sales-conditions-market { grid-column: 1 / -1; grid-row: 4; }
#screen-search .sales-conditions-without-price .sales-conditions-terms { grid-column: 1 / -1; grid-row: 2; }
#screen-search .sales-conditions-terms .core-return-policy-grid:has(.core-return-badge.not-required) .core-return-policy-item:has(.core-charge-value:empty) { display: none; }

@media (min-width: 768px) {
  #screen-search .detail-customer-section .product-kind-select { min-height: 34px; }
  #screen-search .detail-customer-section .detail-sales-kind-row .detail-sales-term-value { padding: 0; }
  #screen-search .detail-customer-shipping-rule > small { grid-column: 1 / -1; text-align: left; }
  #screen-search .detail-customer-shipping-rule { margin-top: 4px; padding-top: 4px; }
  #screen-search .sales-conditions-terms .core-return-policy-panel.vertical .core-return-policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #screen-search .sales-conditions-terms .core-return-policy-panel.vertical .core-return-policy-item { border-bottom: 0; background: transparent; }
  #sales-shipping-estimate-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; align-items: start; }
  #sales-shipping-estimate-wrap > .sales-shipping-profile,
  #sales-shipping-estimate-wrap > .sales-shipping-method,
  #sales-shipping-estimate-wrap > .sales-shipping-controls,
  #sales-shipping-estimate-wrap > .sales-shipping-message,
  #sales-shipping-estimate-wrap > .sales-detail-empty { grid-column: 1 / -1; }
  #sales-shipping-estimate-wrap > .sales-shipping-profile { margin: 0; padding-bottom: 2px; }
  #sales-shipping-estimate-wrap > .sales-shipping-method { margin: 0; }
  #sales-shipping-estimate-wrap > .sales-shipping-result { margin: 0; padding-top: 4px; }
  #sales-shipping-estimate-wrap > .sales-shipping-island { margin: 0; padding: 4px; }
  #screen-search .detail-main-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 4px; margin-bottom: 0; }
  #screen-search .detail-spec-grid { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); }
  #screen-search .detail-main-grid .detail-spec-after-maker { margin-top: 4px; }
  #screen-search .detail-main-grid .detail-vehicle-label,
  #screen-search .detail-main-grid .detail-vehicle-value,
  #screen-search .detail-main-grid .ac-part-row { min-height: 28px; }
  #screen-search .detail-main-grid .detail-vehicle-label,
  #screen-search .detail-main-grid .detail-vehicle-value,
  #screen-search .detail-main-grid .ac-part-label,
  #screen-search .detail-main-grid .ac-part-value { padding-top: 4px; padding-bottom: 4px; }
}

@media (min-width: 1024px) {
  #sales-detail-basic { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
  #sales-detail-basic .detail-main-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  #sales-detail-basic .sales-basic-compatible { margin-top: 0; border-top: 0; padding-top: 0; }
}

@container (max-width: 534px) {
  .sales-basic-compatible-wrap { max-height: 215px; }
}

@media (max-width: 1120px) and (min-width: 768px) {
  #screen-search .sales-conditions-panel { grid-template-columns: minmax(230px, 1.15fr) minmax(0, 1fr); padding: 10px 12px; gap: 8px 12px; }
  #screen-search .sales-product-identity { padding: 10px 12px; }
  .sales-product-identity h2 { font-size: 22px; }
  .sales-detail-tab { padding-right: 10px; padding-left: 10px; }
}

@media (max-width: 980px) and (min-width: 768px) {
  #screen-search .sales-conditions-panel { grid-template-columns: minmax(0, 1fr); }
  #screen-search .sales-conditions-panel .sales-conditions-terms { grid-column: 1; grid-row: 3; }
  #screen-search .sales-conditions-panel .sales-shipping-estimate { grid-column: 1; grid-row: 4; }
  #screen-search .sales-conditions-panel .sales-conditions-market { grid-column: 1; grid-row: 5; }
}

@media (max-width: 767px) {
  #screen-search .panel-scroll { overflow-y: auto; }
  #screen-search .panel-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 100%;
    height: auto;
    overflow: visible;
  }
  #screen-search .sales-product-identity { grid-column: 1; grid-row: 1; padding: 14px; }
  .sales-product-identity h2 { font-size: 22px; }
  #screen-search .sales-conditions-panel {
    grid-column: 1;
    grid-row: 2;
    position: static;
    align-self: stretch;
    justify-self: stretch;
    width: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    height: auto;
    overflow: visible;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid #d8e0ea;
    border-left: 0;
    padding: 12px;
  }
  #screen-search .sales-conditions-panel .detail-customer-section,
  #screen-search .sales-conditions-terms,
  #screen-search .sales-conditions-market,
  #screen-search .sales-shipping-estimate { grid-column: 1; grid-row: auto; }
  #screen-search .sales-conditions-without-shipping .sales-conditions-terms,
  #screen-search .sales-conditions-without-shipping .sales-conditions-market { grid-column: 1; grid-row: auto; }
  #screen-search .sales-conditions-terms { order: 1; }
  #screen-search .sales-shipping-estimate { order: 2; }
  #screen-search .sales-conditions-market { order: 3; }
  #screen-search .panel-left { grid-column: 1; grid-row: 3; overflow: visible; }
  .customer-shipping-rule-options { grid-template-columns: minmax(0, 1fr); }
  .sales-detail-tabs { position: sticky; top: 0; }
  .sales-detail-tab-panel { padding: 14px; }
  .sales-detail-component-entry { align-items: stretch; flex-direction: column; }
  .sales-detail-component-entry .btn-sm-edit { width: 100%; min-height: 36px; }
  .sales-detail-image-grid { grid-template-columns: minmax(0, 1fr); }
  .sales-detail-image-kind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #screen-search #img-grid { max-height: none; overflow: visible; }
  #screen-search .sales-detail-image-grid .img-wrap { width: 100%; height: auto; aspect-ratio: 1; flex: initial; }
}
@media (max-width: 430px) {
  .sales-shipping-controls label:first-child,
  .sales-shipping-size-control { grid-column: 1 / -1; }
}
.panel-welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #ccc; font-size: 14px; gap: 12px; }
.panel-welcome .wicon { font-size: 44px; }

/* Manufacturing instruction search */
.production-body { flex: 1; display: grid; grid-template-columns: minmax(310px, 350px) minmax(0, 1fr); overflow: hidden; background: var(--dcats-surface); }
.production-left { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--dcats-border); background: var(--dcats-surface); }
.production-search { padding: 10px var(--dcats-space-3); background: #fff; border-bottom: 1px solid var(--dcats-border); }
.production-search .search-row .search-input { min-width: 0; }
.production-search .search-row .btn-clear { flex: 0 0 auto; min-height: var(--dcats-control-height-compact); padding: 0 7px; }
.production-category-filter { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--dcats-space-2); margin-top: var(--dcats-space-2); }
.production-category-filter label { font-size: var(--dcats-type-supporting); font-weight: 700; color: #667085; white-space: nowrap; }
.production-category-filter .form-select { height: var(--dcats-control-height-compact); min-height: var(--dcats-control-height-compact); border-color: var(--dcats-border); border-radius: var(--dcats-control-radius); padding: 0 32px 0 10px; font-size: var(--dcats-type-body); }
.production-category-filter .form-select:focus { border-color: var(--dcats-focus); box-shadow: var(--dcats-focus-ring); }
.production-ranking-tools { display: flex; gap: var(--dcats-space-2); margin-top: var(--dcats-space-2); align-items: center; flex-wrap: wrap; }
.production-ranking-tools .form-select { width: 100%; min-width: 0; }
.production-ranking-tools .btn-sm-edit { min-height: var(--dcats-control-height-compact); border-radius: var(--dcats-control-radius); padding: 0 10px; font-size: var(--dcats-type-supporting); }
.production-stamp-search-card { width: min(700px, calc(100vw - 28px)); max-width: 700px; padding: 0; overflow: hidden; border-radius: 8px; }
.production-stamp-search-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--dcats-border); padding: 18px 20px 14px; background: #f7f9fc; }
.production-stamp-search-head .product-form-eyebrow { color: #1a6fd4; font-size: 10px; font-weight: 800; }
.production-stamp-search-head h3 { margin: 2px 0 4px; color: var(--dcats-ink); font-size: 18px; }
.production-stamp-search-head p { margin: 0; color: #667085; font-size: 12px; line-height: 1.5; }
.production-stamp-search-close { flex: 0 0 34px; width: 34px; min-width: 34px; height: 34px; padding: 0; font-size: 20px; line-height: 1; }
.production-stamp-search-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 18px 20px 4px; }
.production-stamp-search-fields .form-row { min-width: 0; margin: 0; }
.production-stamp-search-fields .form-input { font-variant-numeric: tabular-nums; }
.production-stamp-search-error { margin: 6px 20px 0; text-align: left; }
.production-stamp-search-card .form-footer { margin-top: 8px; padding: 12px 20px 16px; }
.production-filter-row { display: flex; gap: var(--dcats-space-2); overflow-x: auto; padding: var(--dcats-space-2) var(--dcats-space-4); background: #fff; border-bottom: 1px solid var(--dcats-border); }
.production-filter-row .chip { min-height: var(--dcats-control-height-compact); border-color: var(--dcats-border); border-radius: var(--dcats-control-radius); padding: 0 var(--dcats-space-3); font-size: var(--dcats-type-supporting); }
.production-count { padding: var(--dcats-space-2) var(--dcats-space-4); font-size: var(--dcats-type-supporting); color: #667085; background: var(--dcats-surface); border-bottom: 1px solid var(--dcats-border); }
.production-list { flex: 1; overflow-y: auto; padding: var(--dcats-space-2); }
.production-load-more-wrap { padding: 0 var(--dcats-space-2) var(--dcats-space-3); background: var(--dcats-surface); }
.production-load-more-wrap .btn-load-more { min-height: var(--dcats-control-height-compact); border-color: var(--dcats-border); border-radius: var(--dcats-control-radius); padding: 0 var(--dcats-space-3); font-size: var(--dcats-type-supporting); }
.production-card { background: #fff; border: 1px solid var(--dcats-border); border-radius: var(--dcats-card-radius); padding: 10px 11px; margin-bottom: var(--dcats-space-2); cursor: pointer; display: grid; gap: 5px; }
.production-card:hover { border-color: #8aa9d8; box-shadow: 0 2px 10px rgba(47,111,237,.1); }
.production-card.selected { border-color: #e58a96; background: var(--dcats-brand-red-soft); box-shadow: inset 3px 0 0 var(--dcats-brand-red); }
.production-card-top { display: flex; align-items: center; justify-content: space-between; gap: var(--dcats-space-2); }
.production-rank { font-size: var(--dcats-type-supporting); font-weight: 800; color: var(--dcats-ink); }
.production-status { font-size: var(--dcats-type-supporting); font-weight: 700; border-radius: 999px; padding: 2px var(--dcats-space-2); white-space: nowrap; }
.production-status.ready { background: #e9f8ef; color: #247a42; }
.production-status.need { background: #fff4e5; color: #aa6512; }
.production-component-counts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.production-component-pill { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 34px; border-radius: 999px; border: 1px solid transparent; padding: 2px 6px; font-size: 11px; font-weight: 800; line-height: 1.25; white-space: nowrap; }
.production-component-pill.rebuilt { background: var(--kind-rebuilt-bg); color: var(--kind-rebuilt-fg); border-color: var(--kind-rebuilt-border); }
.production-component-pill.aftermarket_new { background: var(--kind-aftermarket-bg); color: var(--kind-aftermarket-fg); border-color: var(--kind-aftermarket-border); }
.production-number { font-size: var(--dcats-type-body); font-weight: 800; color: var(--dcats-ink); word-break: break-all; }
.production-sub-number { font-size: var(--dcats-type-supporting); color: #64748b; line-height: 1.4; word-break: break-all; }
.production-stamp-result-pairs { display: flex; flex-wrap: wrap; gap: 4px; }
.production-stamp-result-pairs span { display: inline-flex; min-height: 20px; align-items: center; border: 1px solid #bfd3ef; border-radius: 4px; padding: 1px 6px; background: #eef5ff; color: #245487; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.production-meta { font-size: var(--dcats-type-supporting); color: #7c8492; line-height: 1.4; }
.production-label-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.production-label-row .product-kind-list { margin-top: 0; }
.production-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; flex: 0 0 auto; }
.badge-slot-list { display: grid; grid-template-columns: 62px; gap: 4px; justify-items: stretch; align-items: start; flex: 0 0 62px; }
.badges.badge-slot-list { grid-template-columns: 58px 50px; flex: 0 0 112px; align-items: stretch; }
.card-badges-inline.badge-slot-list { grid-template-columns: 60px 30px 30px 52px; gap: 3px; width: 181px; flex: none; margin-top: 4px; }
.production-badges.badge-slot-list { display: grid; grid-template-columns: repeat(2, 64px); flex: 0 0 132px; justify-content: end; }
.badge-slot { min-width: 0; min-height: 18px; display: flex; align-items: center; justify-content: flex-end; }
.badge-slot.slot-empty { visibility: hidden; }
.badge-slot > span { width: 100%; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.production-right { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; }
.production-panel-topbar { position: sticky; top: 0; z-index: 2; border-bottom-color: var(--dcats-border); background: #fff; }
.production-detail { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; max-width: none; overflow: hidden; padding: 10px 12px 12px; }
.production-detail-empty { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #a0a7b2; gap: 8px; }
.production-detail-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: var(--dcats-space-3); border-bottom: 1px solid var(--dcats-border); padding: 0 0 9px; margin-bottom: 10px; }
.production-head-main { min-width: 0; flex: 1 1 auto; }
.production-head-context { display: flex; align-items: center; gap: 7px; min-height: 20px; margin-bottom: 2px; color: #667085; font-size: 11px; font-weight: 800; }
.production-priority { display: inline-flex; align-items: center; min-height: 20px; border: 1px solid #e4c06a; border-radius: 4px; padding: 1px 6px; background: #fff8df; color: #825b00; font-variant-numeric: tabular-nums; }
.production-detail-title { font-size: var(--dcats-type-heading); font-weight: 800; color: var(--dcats-ink); }
.production-detail-meta { display: flex; align-items: center; gap: 10px 16px; margin-top: 4px; color: #5f6b7a; font-size: 11px; }
.production-detail-meta > span { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; }
.production-detail-meta small { color: #8a93a3; font-size: 10px; white-space: nowrap; }
.production-detail-meta strong { min-width: 0; color: #344054; font-size: 11px; overflow-wrap: anywhere; }
.production-actions { display: flex; gap: var(--dcats-space-2); flex-wrap: wrap; justify-content: flex-end; }
.production-workspace { display: grid; flex: 1 1 auto; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .85fr); gap: 10px; min-height: 0; overflow: hidden; }
.production-master-column, .production-operations-column { display: grid; gap: 10px; min-width: 0; min-height: 0; overflow: hidden; }
.production-master-column { grid-template-rows: minmax(250px, 1.05fr) minmax(165px, .75fr) minmax(90px, .4fr); }
.production-operations-column { grid-template-rows: auto auto; align-content: start; }
.production-image-panel { min-width: 0; margin: 0; }
.production-image-title { font-size: var(--dcats-type-supporting); font-weight: 700; color: #667085; white-space: nowrap; }
.production-image-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 5px; }
.production-image-group { min-width: 0; padding-top: 6px; border-top: 1px solid #e4e8ef; }
.production-image-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; }
.production-image-kind { font-size: var(--dcats-type-supporting); font-weight: 800; color: #344054; white-space: nowrap; }
.production-image-group.rebuilt .production-image-kind { color: #1f6b3b; }
.production-image-group.aftermarket_new .production-image-kind { color: #245ea8; }
.production-image-count { font-size: var(--dcats-type-supporting); color: #8a93a3; min-width: 0; }
.production-image-strip { display: flex; gap: 6px; overflow-x: auto; min-height: 48px; padding: 3px 0 2px; }
.production-image-strip.empty { min-height: 24px; }
.production-image-thumb { flex: 0 0 46px; width: 46px; height: 46px; border: 1px solid #dbe3ef; border-radius: 6px; background: #f8fafc; padding: 0; overflow: hidden; cursor: pointer; }
.production-image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.production-image-thumb:hover { border-color: #4f8ef7; box-shadow: 0 2px 8px rgba(79,142,247,.16); }
.production-image-more, .production-image-empty { flex: 0 0 auto; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 11px; }
.production-image-strip.empty .production-image-empty { min-height: 24px; }
.production-image-more { min-width: 46px; padding: 0 9px; background: #eef4ff; color: #174ea6; font-weight: 700; }
.production-image-empty { color: #a0a7b2; padding: 0 2px; }
.production-section { border: 1px solid var(--dcats-border); border-radius: var(--dcats-card-radius); padding: var(--dcats-space-3); background: #fff; }
.production-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; margin-bottom: 5px; border-bottom: 1px solid #e6ebf1; padding-bottom: 5px; }
.production-section-heading h3, .production-section h3 { margin: 0; color: #243247; font-size: var(--dcats-type-body); }
.production-section-heading > span { color: #7b8797; font-size: 10px; font-weight: 700; white-space: nowrap; }
.production-master-section { min-height: 0; overflow: auto; }
.production-master-section .detail-main-grid { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.production-component-summary-section { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.production-component-summary-heading { flex: 0 0 auto; flex-wrap: wrap; }
.production-component-summary-heading h3 { white-space: nowrap; }
.production-component-summary-heading > div:first-child { display: flex; min-width: 0; align-items: baseline; gap: 8px; }
.production-component-summary-heading > div:first-child > span { color: #6f7b8c; font-size: 10px; font-weight: 700; white-space: nowrap; }
.production-component-summary-section { container-type: inline-size; container-name: production-components; }
.production-component-summary-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.production-component-kind-switch { display: grid; grid-template-columns: repeat(2, minmax(64px, 1fr)); min-height: 30px; overflow: hidden; border: 1px solid #cbd5e1; border-radius: var(--dcats-control-radius); background: #f4f6f8; }
.production-component-kind-button { min-width: 0; border: 0; border-radius: 0; padding: 4px 8px; background: transparent; color: #667085; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.production-component-kind-button + .production-component-kind-button { border-left: 1px solid #cbd5e1; }
.production-component-kind-button[data-production-component-summary-kind="rebuilt"].active { background: var(--kind-rebuilt-bg); color: var(--kind-rebuilt-fg); }
.production-component-kind-button[data-production-component-summary-kind="aftermarket_new"].active { background: var(--kind-aftermarket-bg); color: var(--kind-aftermarket-fg); }
.production-component-summary-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.production-component-summary-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; color: #263548; font-size: 10px; }
.production-component-summary-table th { position: sticky; top: 0; z-index: 1; border-bottom: 1px solid #dbe3ec; padding: 5px 6px; background: #f5f7fa; color: #667085; font-size: 9px; font-weight: 800; line-height: 1.25; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.production-component-summary-table td { min-width: 0; border-bottom: 1px solid #e9edf2; padding: 6px; vertical-align: top; overflow-wrap: anywhere; }
.production-component-summary-table tr:last-child td { border-bottom: 0; }
.production-component-summary-table th:nth-child(1) { width: 28%; }
.production-component-summary-table th:nth-child(2) { width: auto; }
.production-component-summary-table th:nth-child(3) { width: 36px; text-align: right; }
.production-component-summary-table th:nth-child(4) { width: 22%; }
.production-component-summary-table th:nth-child(5) { width: 54px; text-align: right; }
.production-component-summary-table td:nth-child(2) { overflow-wrap: anywhere; word-break: normal; white-space: normal; }
.production-component-summary-table strong,
.production-component-summary-table small { display: block; min-width: 0; }
.production-component-summary-table strong { color: #17243a; font-size: 11px; font-weight: 800; }
.production-component-summary-table small { margin-top: 2px; color: #7a8492; font-size: 9px; line-height: 1.35; }
.production-component-summary-number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.production-component-summary-procurement { overflow-wrap: anywhere; word-break: normal; }
.production-component-summary-table td.production-component-summary-memo { padding-top: 0; color: #667085; line-height: 1.4; white-space: pre-wrap; }
.production-component-summary-memo-label { color: #344054; font-weight: 700; }
@container production-components (max-width: 400px) {
  .production-component-summary-table th, .production-component-summary-table td { padding-right: 3px; padding-left: 3px; }
  .production-component-summary-table th:nth-child(1) { width: 26%; }
  .production-component-summary-table th:nth-child(3) { width: 28px; }
  .production-component-summary-table th:nth-child(4) { width: 20%; }
  .production-component-summary-table th:nth-child(5) { width: 46px; }
}
.production-component-summary-empty,
.production-component-summary-error { display: flex; min-height: 64px; align-items: center; justify-content: center; color: #8993a2; font-size: 11px; }
.production-component-summary-error { color: #b42318; }
.production-stamp-detail { margin-top: 8px; border-top: 1px solid #e6ebf1; padding-top: 7px; }
.production-stamp-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; margin-bottom: 5px; }
.production-stamp-detail-head > span { color: #536176; font-size: 11px; font-weight: 800; }
.production-stamp-pair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 7px; max-height: 157px; overflow-y: auto; padding: 1px 1px 5px; }
.production-stamp-pair { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1.35fr); min-height: 38px; overflow: hidden; border: 1px solid #cfd9e6; border-left: 3px solid #4f8fea; border-radius: 5px; background: #fff; }
.production-stamp-pair > span { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; min-width: 0; min-height: 36px; padding: 6px 8px; line-height: 1.25; }
.production-stamp-pair > span:first-child { background: #f3f8ff; }
.production-stamp-pair > span + span { border-left: 1px solid #d8e0ea; background: #fffaf0; }
.production-stamp-pair > span:nth-child(3) { background: #f4fbf5; }
.production-stamp-pair small { color: #66778d; font-size: 10px; font-weight: 800; line-height: 1.25; }
.production-stamp-pair > span:first-child small { color: #1f6fd6; }
.production-stamp-pair > span:nth-child(2) small { color: #956500; }
.production-stamp-pair > span:nth-child(3) small { color: #287542; }
.production-stamp-pair strong { color: #14213a; font-size: 13px; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.production-stamp-empty { min-height: 30px; padding: 6px 4px; color: #8a93a3; font-size: 11px; }
.production-kikan-section { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#production-kikan-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.production-core-section { min-height: 0; overflow: visible; }
.production-core-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #edf0f4; }
.production-core-meta .production-kv { grid-template-columns: minmax(88px, auto) minmax(0, 1fr); border-top: 0; }
.production-core-meta .production-kv + .production-kv { grid-template-columns: minmax(48px, auto) minmax(0, 1fr); }
.production-core-meta .production-kv + .production-kv { border-left: 1px solid #edf0f4; }
.production-core-meta .production-kv div { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.production-kv { display: grid; grid-template-columns: 118px minmax(0, 1fr); border-top: 1px solid #f2f2f2; }
.production-kv:first-of-type { border-top: 0; }
.production-kv div { padding: 6px 4px; font-size: var(--dcats-type-body); word-break: break-word; }
.production-kv div:first-child { color: #8a93a3; }
.production-kv div:last-child { font-weight: 600; color: #111a33; }
.production-wide { grid-column: 1 / -1; }
.production-pre { white-space: pre-wrap; font-size: var(--dcats-type-supporting); line-height: 1.55; color: var(--dcats-ink); background: #fafbfc; border: 1px solid var(--dcats-border); border-radius: var(--dcats-card-radius); padding: 10px; }
.production-mini-table { width: 100%; border-collapse: collapse; font-size: var(--dcats-type-supporting); }
.production-mini-table th { text-align: left; color: #6b7280; font-weight: 600; border-bottom: 1px solid #edf0f4; padding: 6px 4px; }
.production-mini-table td { border-bottom: 1px solid #f4f5f7; padding: 7px 4px; vertical-align: top; word-break: break-word; }
.production-form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.production-form-row input { height: var(--dcats-control-height-compact); border: 1px solid var(--dcats-border); border-radius: var(--dcats-control-radius); padding: 0 10px; font-size: var(--dcats-type-body); min-width: 0; outline: none; }
.production-form-row input:focus { border-color: var(--dcats-focus); box-shadow: var(--dcats-focus-ring); }
.production-form-row input[type="number"] { width: 92px; }
.production-form-row input[type="text"] { flex: 1; min-width: 180px; }
.production-form-row button { flex-shrink: 0; }
.production-help { color: #8a93a3; font-size: var(--dcats-type-supporting); line-height: 1.5; margin-top: 6px; }
.production-action-secondary { border-radius: var(--dcats-control-radius); background: #f8fafc; color: #344054; border-color: var(--dcats-border); }
.production-action-secondary:hover { background: #eef2f7; }

/* English labels are often wider than Japanese labels. Keep shared work surfaces readable. */
html[lang="en"] .screen :where(h1, h2, h3, h4, h5, h6, label, legend, th, dt, button, summary) {
  min-width: 0;
  overflow-wrap: anywhere;
}
html[lang="en"] .screen :where(.form-row, .form-grid, .detail-main-grid, .detail-vehicle-grid, .ac-part-row) > * {
  min-width: 0;
}
html[lang="en"] .screen :where(button, .chip, .tab-button, [role="tab"]) {
  max-width: 100%;
  line-height: 1.25;
  white-space: normal;
}
html[lang="en"] #screen-production-search :where(.detail-vehicle-label, .ac-part-label, .detail-spec-grid .detail-vehicle-label) {
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
html[lang="en"] #screen-production-search .detail-vehicle-maker-row .catalog-vehicle-maker-value {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}
html[lang="en"] #screen-production-search :where(.production-section-heading > span, .production-image-kind, .production-detail-meta small) {
  white-space: normal;
  overflow-wrap: anywhere;
}
html[lang="en"] #screen-production-search .production-search .search-row { gap: 4px; }
.production-card:focus-visible,
#screen-production-search button:focus-visible,
#screen-production-search textarea:focus-visible { outline: 2px solid var(--dcats-focus); outline-offset: 2px; }
.core-qty-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 0; margin-bottom: 7px; border: 1px solid #dbe3ec; background: #f8fafc; }
.core-qty-card { min-width: 0; border: 0; border-left: 3px solid #6d86a5; border-radius: 0; padding: 7px 8px; background: transparent; }
.core-qty-card + .core-qty-card { border-left-width: 1px; }
.core-qty-card.rebuilt { border-left-color: var(--kind-rebuilt-border); background: var(--kind-rebuilt-bg); }
.core-qty-card.aftermarket_new { border-left-color: var(--kind-aftermarket-border); background: var(--kind-aftermarket-bg); }
.core-qty-label { font-size: 11px; color: #68758a; font-weight: 700; margin-bottom: 4px; }
.core-qty-value { font-size: 20px; color: #174ea6; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.core-qty-card.rebuilt .core-qty-label,
.core-qty-card.rebuilt .core-qty-value { color: var(--kind-rebuilt-fg); }
.core-qty-card.aftermarket_new .core-qty-label,
.core-qty-card.aftermarket_new .core-qty-value { color: var(--kind-aftermarket-fg); }
.core-qty-sub { font-size: 10px; color: #7c8492; margin-top: 3px; word-break: break-word; }
.core-count-pill { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 3px 8px; border-radius: 999px; background: #eaf2ff; color: #174ea6; font-weight: 700; }
.finished-label-body { max-width: none; padding: 16px; overflow: hidden; }
.finished-label-mode-hub { width: min(1100px, 100%); margin: auto; border: 1px solid #dce5ef; border-radius: 8px; padding: 24px; background: #fff; }
.finished-label-mode-intro { max-width: 720px; }
.finished-label-mode-kicker { display: inline-flex; border-radius: 999px; padding: 4px 10px; background: #eaf2ff; color: #174ea6; font-size: 11px; font-weight: 800; }
.finished-label-mode-intro h2 { margin: 10px 0 6px; color: #14213a; font-size: 24px; }
.finished-label-mode-intro p { margin: 0; color: #647084; font-size: 13px; line-height: 1.7; }
.finished-label-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.finished-label-mode-card { display: flex; align-items: flex-start; flex-direction: column; min-height: 190px; border: 1px solid #d8e1ec; border-radius: 8px; padding: 20px; background: #fff; color: #1b2942; text-align: left; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.finished-label-mode-card:hover, .finished-label-mode-card:focus-visible { border-color: #4f8ef7; box-shadow: 0 10px 25px rgba(45, 94, 160, .12); transform: translateY(-2px); }
.finished-label-mode-card.box { background: #f8fbff; }
.finished-label-mode-card strong { margin-top: 14px; font-size: 22px; font-weight: 900; }
.finished-label-mode-card > span:not(.finished-label-mode-size) { margin-top: 9px; color: #667085; font-size: 12px; line-height: 1.65; }
.finished-label-mode-card em { margin-top: auto; padding-top: 18px; color: #174ea6; font-size: 12px; font-style: normal; font-weight: 800; }
.finished-label-mode-size { border-radius: 6px; padding: 5px 8px; background: #172033; color: #fff; font-family: Consolas, "SFMono-Regular", monospace; font-size: 11px; font-weight: 800; }
.finished-label-setup-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; border: 1px solid #c7d6ce; border-left: 4px solid #1c5c43; border-radius: 6px; padding: 13px 15px; background: #f5f9f7; }
.finished-label-setup-copy { display: flex; align-items: center; gap: 12px; min-width: 0; }
.finished-label-setup-copy > div { display: grid; gap: 2px; min-width: 0; }
.finished-label-setup-copy strong { color: #183e2f; font-size: 14px; }
.finished-label-setup-copy div > span { color: #5b6d64; font-size: 11px; line-height: 1.5; }
.finished-label-setup-kicker { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 24px; border-radius: 4px; padding: 3px 7px; background: #1c5c43; color: #fff; font-size: 10px; font-weight: 900; }
.finished-label-setup-kicker.checking { background: #5c6b7a; }
.finished-label-setup-kicker.attention { background: #9b690d; }
.finished-label-setup-kicker.unavailable, .finished-label-setup-kicker.pc_only { background: #6b7280; }
.finished-label-setup-actions, .finished-label-device-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.finished-label-setup-actions a, .finished-label-setup-actions button, .finished-label-device-actions a, .finished-label-device-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; text-decoration: none; white-space: nowrap; }
.finished-label-setup-guide[hidden], .finished-label-setup-guide-panel[hidden], .finished-label-setup-guide-downloaded[hidden], .finished-label-setup-guide-launch-note[hidden] { display: none !important; }
.finished-label-setup-guide { position: fixed; z-index: 5200; inset: 0; display: grid; place-items: center; padding: 18px; }
.finished-label-setup-guide-backdrop { position: absolute; inset: 0; background: rgba(17, 28, 47, .64); }
.finished-label-setup-guide-card { position: relative; z-index: 1; width: min(100%, 760px); max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px); overflow-y: auto; border: 1px solid #d6e0e8; border-radius: 8px; padding: 24px; background: #fff; color: #17233a; box-shadow: 0 24px 70px rgba(12, 24, 43, .28); }
.finished-label-setup-guide-card > h2 { margin: 9px 42px 4px 0; color: #14213a; font-size: 22px; line-height: 1.35; }
.finished-label-setup-guide-card > p { margin: 0; color: #637083; font-size: 13px; line-height: 1.6; }
.finished-label-setup-detection { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 14px; border: 1px solid #d7e0e8; border-left: 4px solid #64748b; border-radius: 6px; padding: 11px 12px; background: #f6f8fa; }
.finished-label-setup-detection-indicator { width: 10px; height: 10px; border-radius: 50%; background: #64748b; }
.finished-label-setup-detection > div { display: grid; gap: 2px; min-width: 0; }
.finished-label-setup-detection strong { color: #253448; font-size: 13px; }
.finished-label-setup-detection div > span { color: #5e6c7e; font-size: 11px; line-height: 1.5; }
.finished-label-setup-detection.configured { border-left-color: #237b4b; background: #eff8f3; }
.finished-label-setup-detection.configured .finished-label-setup-detection-indicator { background: #237b4b; }
.finished-label-setup-detection.attention { border-left-color: #c58a17; background: #fff8e8; }
.finished-label-setup-detection.attention .finished-label-setup-detection-indicator { background: #c58a17; }
.finished-label-setup-detection.unavailable { border-left-color: #b54b4b; background: #fff3f3; }
.finished-label-setup-detection.unavailable .finished-label-setup-detection-indicator { background: #b54b4b; }
.finished-label-setup-detection.pc_only { border-left-color: #3677b7; background: #f1f6fb; }
.finished-label-setup-detection.pc_only .finished-label-setup-detection-indicator { background: #3677b7; }
.finished-label-setup-detection.checking .finished-label-setup-detection-indicator { animation: finished-label-setup-pulse 1s ease-in-out infinite alternate; }
@keyframes finished-label-setup-pulse { from { opacity: .35; } to { opacity: 1; } }
.finished-label-setup-guide-close { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #cbd5df; border-radius: 50%; background: #fff; color: #526074; font-size: 15px; cursor: pointer; }
.finished-label-setup-guide-close:hover { border-color: #8da0b3; background: #f3f6f8; }
.finished-label-setup-guide-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; border: 1px solid #aebdc9; border-radius: 6px; overflow: hidden; }
.finished-label-setup-guide-tabs button { min-height: 44px; border: 0; border-radius: 0; padding: 9px 14px; background: #fff; color: #344457; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.finished-label-setup-guide-tabs button + button { border-left: 1px solid #aebdc9; }
.finished-label-setup-guide-tabs button[aria-selected="true"] { background: #1c5c43; color: #fff; }
.finished-label-setup-guide-panel { margin-top: 15px; }
.finished-label-setup-guide-steps { margin: 0; padding: 0; list-style: none; }
.finished-label-setup-guide-steps > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; border-top: 1px solid #e1e6eb; padding: 13px 0; }
.finished-label-setup-guide-steps > li:first-child { border-top: 0; padding-top: 3px; }
.finished-label-setup-guide-step-number { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #e6f1ec; color: #18543d; font-size: 13px; font-weight: 900; }
.finished-label-setup-guide-steps strong { display: block; color: #1c2c42; font-size: 14px; }
.finished-label-setup-guide-steps p { margin: 4px 0 0; color: #657185; font-size: 12px; line-height: 1.65; }
.finished-label-setup-guide-steps a { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; margin-top: 9px; text-decoration: none; }
.finished-label-setup-guide-steps code { display: inline-block; margin-top: 7px; border: 1px solid #d8e0e8; border-radius: 4px; padding: 5px 7px; background: #f5f7f9; color: #26384d; font-size: 12px; overflow-wrap: anywhere; }
.finished-label-setup-guide-downloaded { display: block; margin-top: 8px; color: #1b6943; font-size: 11px; font-weight: 800; }
.finished-label-setup-guide-language-note, .finished-label-setup-guide-launch-note, .finished-label-setup-guide-fallback { display: grid; gap: 3px; border-left: 4px solid #3677b7; padding: 10px 12px; background: #f1f6fb; color: #40536b; font-size: 12px; line-height: 1.55; }
.finished-label-setup-guide-language-note strong, .finished-label-setup-guide-launch-note strong, .finished-label-setup-guide-fallback strong { color: #1f3f60; font-size: 13px; }
.finished-label-setup-guide-installed-copy { margin-bottom: 14px; }
.finished-label-setup-guide-installed-copy strong { color: #1c2c42; font-size: 16px; }
.finished-label-setup-guide-installed-copy p { margin: 5px 0 0; color: #657185; font-size: 12px; line-height: 1.65; }
.finished-label-setup-guide-panel > .btn-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; text-decoration: none; }
.finished-label-setup-guide-launch-note { margin-top: 12px; border-left-color: #278458; background: #edf8f2; }
.finished-label-setup-guide-fallback { margin-top: 12px; border-left-color: #d69a25; background: #fff8e7; }
.finished-label-setup-guide-fallback button { justify-self: start; margin-top: 6px; }
.finished-label-setup-guide-footer { display: flex; justify-content: flex-end; margin-top: 18px; border-top: 1px solid #e1e6eb; padding-top: 14px; }
.finished-label-setup-guide button:focus-visible, .finished-label-setup-guide a:focus-visible { outline: 3px solid rgba(47, 111, 237, .32); outline-offset: 2px; }

.finished-label-setup-guide-driver { margin-top: 10px; border-top: 1px dashed #cbd5df; padding-top: 4px; }
.finished-label-setup-guide-driver > a { color: #185995; font-size: 13px; font-weight: 700; text-decoration: underline; overflow-wrap: anywhere; }
.finished-label-setup-guide-checklist { margin: 10px 0; padding-left: 22px; color: #405168; font-size: 13px; line-height: 1.7; }
.finished-label-setup-guide-checklist > li { display: list-item; margin: 8px 0; padding: 0; border: 0; }
.finished-label-setup-guide-window { margin-top: 10px; border-left: 4px solid #3677b7; padding: 8px 10px; background: #f1f6fb; color: #1f3f60; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.finished-label-setup-guide-help { margin-top: 12px; border: 1px solid #cbd5df; border-radius: 6px; padding: 10px 12px; background: #f8fafc; }
.finished-label-setup-guide-help > summary { min-height: 28px; color: #1f4f7a; font-size: 13px; font-weight: 800; cursor: pointer; line-height: 1.6; }
.finished-label-setup-guide-help > summary:focus-visible { outline: 3px solid rgba(47, 111, 237, .32); outline-offset: 3px; }
.finished-label-setup-guide-steps .finished-label-setup-guide-help a { display: inline; min-height: 0; margin: 0; color: #185995; text-decoration: underline; overflow-wrap: anywhere; }
.finished-label-setup-guide-steps .finished-label-setup-guide-file-note { overflow-wrap: anywhere; }
body.finished-label-setup-guide-open { overflow: hidden; }
.finished-label-workspace { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.finished-label-workspace[hidden], [data-finished-label-product-only][hidden], [data-finished-label-box-only][hidden] { display: none !important; }
.finished-label-mode-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.finished-label-mode-bar .back-btn { color: #344054; background: #fff; border: 1px solid #d8e1ec; border-radius: 7px; padding: 7px 10px; }
#finished-label-mode-badge { border-radius: 999px; padding: 5px 10px; background: #eaf2ff; color: #174ea6; font-size: 11px; font-weight: 800; }
.finished-label-shell { display: grid; flex: 1; grid-template-columns: 360px minmax(0, 1fr); gap: 14px; height: 100%; min-height: 0; }
.finished-label-left, .finished-label-editor { min-height: 0; overflow: auto; }
.finished-label-left { display: flex; flex-direction: column; gap: 12px; }
.finished-label-card { background: #fff; border: 1px solid #e5eaf0; border-radius: 8px; padding: 12px; }
.finished-label-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: #1a1a2e; }
.finished-label-search-row { display: flex; gap: 8px; }
.finished-label-search-row input { flex: 1; min-width: 0; border: 1px solid #d7dce5; border-radius: 8px; padding: 9px 10px; font-size: 13px; }
.finished-label-results, .finished-label-history-list { display: flex; flex-direction: column; gap: 8px; }
.finished-label-result { width: 100%; border: 1px solid #edf0f4; background: #fbfcff; border-radius: 8px; padding: 10px; text-align: left; cursor: pointer; }
.finished-label-result:hover, .finished-label-result.active { border-color: #4f8ef7; background: #f0f6ff; }
.finished-label-result.priority { border-left: 4px solid #2e8b57; }
.finished-label-result-title { font-size: 14px; font-weight: 800; color: #111a33; word-break: break-word; }
.finished-label-result-number-row { display: flex; align-items: baseline; gap: 6px; min-width: 0; margin-top: 4px; font-size: 11px; line-height: 1.35; }
.finished-label-result-number-label { flex: 0 0 auto; color: #667085; font-weight: 700; }
.finished-label-search-meta { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 4px 8px; flex-wrap: wrap; }
.finished-label-product-pages { display: flex; gap: 4px; }
.finished-label-product-pages[hidden] { display: none; }
.finished-label-product-pages button { min-height: 28px; }
.finished-label-result-numbers { display: flex; gap: 0 10px; flex-wrap: wrap; }
.finished-label-result-numbers > .finished-label-result-number-row { max-width: 100%; }
.finished-label-result-number-value { min-width: 0; color: #26324a; font-weight: 800; overflow-wrap: anywhere; }
.finished-label-result-priority { display: inline-flex; margin-top: 5px; border-radius: 999px; padding: 2px 7px; background: #e5f5eb; color: #1f6b3e; font-size: 9px; font-weight: 900; }
.finished-label-result-priority.unavailable { background: #f2f4f7; color: #667085; }
.finished-label-result-sub { font-size: 11px; color: #667085; margin-top: 3px; line-height: 1.45; word-break: break-word; }
.finished-label-load-more { margin-top: 8px; padding: 8px; font-size: 12px; }
.finished-label-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.finished-label-stock-option { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 8px; border-radius: 6px; background: #edf7ed; color: #245437; font-size: 12px; font-weight: 700; }
.finished-label-stock-option[hidden] { display: none !important; }
.finished-label-stock-option input { flex: 0 0 auto; width: 18px; height: 18px; }
.finished-label-print-toolbar { flex: 0 0 auto; justify-content: flex-start; padding: 8px 10px; border: 1px solid #dce2eb; border-radius: 10px; background: #fff; }
.finished-label-print-toolbar .finished-label-print-quantity label { margin: 0; white-space: nowrap; }
.finished-label-print-toolbar .finished-label-print-quantity input { width: 80px; }
.finished-label-toolbar .finished-label-print-action { min-height: 36px; padding: 8px 15px; font-size: 15px; font-weight: 900; line-height: 1.1; }
.finished-label-toolbar .finished-label-print-action:disabled { border-color: #cbd2dd; background: #cbd2dd; color: #fff; cursor: not-allowed; opacity: 1; }
.finished-label-toolbar .finished-label-print-action.missing-g-number { border: 1px solid #e4ad3b; background: #fff1c9; color: #7d4b00; cursor: help; }
.finished-label-selected { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.finished-label-selected-cell { flex: 1 0 auto; min-width: 0; max-width: 100%; border: 1px solid #edf0f4; border-radius: 8px; background: #fbfcfe; padding: 9px 10px; min-height: 54px; }
.finished-label-selected-label { font-size: 11px; color: #7c8492; font-weight: 700; margin-bottom: 3px; }
.finished-label-selected-value { font-size: 14px; color: #111a33; font-weight: 800; overflow-wrap: anywhere; }
.finished-label-selected-number { display: inline-block; white-space: nowrap; }
.finished-label-selected-part [hidden] { display: none; }
.finished-label-selected-number-view { border: 0; background: transparent; color: #174ea6; font: inherit; text-decoration: underline; cursor: pointer; }
.finished-label-number-dialog { width: min(34rem, calc(100% - 24px)); margin: auto; padding: 16px; border: 1px solid #d7dce5; border-radius: 8px; color: #111a33; overflow-wrap: anywhere; }
.finished-label-number-dialog::backdrop { background: #18263c66; }
.finished-label-number-dialog p { margin: 8px 0 12px; user-select: text; }
.finished-label-number-dialog form { display: flex; justify-content: flex-end; }
.finished-label-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.finished-label-form-grid .wide { grid-column: span 2; }
.finished-label-form-grid .full { grid-column: 1 / -1; }
.finished-label-field label { display: block; font-size: 11px; color: #667085; font-weight: 700; margin-bottom: 4px; }
.finished-label-field input, .finished-label-field select, .finished-label-field textarea { width: 100%; border: 1px solid #d7dce5; border-radius: 8px; padding: 8px 9px; font-size: 13px; background: #fff; }
.finished-label-field textarea { min-height: 62px; resize: vertical; }
.finished-label-table-wrap { overflow-x: auto; border: 1px solid #e5eaf0; border-radius: 8px; background: #fff; }
.finished-label-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 760px; }
.finished-label-table th { background: #f5f7fa; color: #556070; text-align: left; padding: 7px 8px; border-bottom: 1px solid #e5eaf0; white-space: nowrap; }
.finished-label-table td { padding: 6px 8px; border-bottom: 1px solid #f0f2f5; vertical-align: top; }
.finished-label-table tr:last-child td { border-bottom: 0; }
.finished-label-table input, .finished-label-table select { width: 100%; border: 1px solid #d7dce5; border-radius: 6px; padding: 6px 7px; font-size: 12px; }
.finished-label-component-picker { display: grid; grid-template-columns: minmax(280px, 1fr) auto auto; align-items: center; gap: 8px; margin: 10px 0; }
.finished-label-component-picker select { min-width: 0; border: 1px solid #d7dce5; border-radius: 7px; padding: 8px 9px; background: #fff; color: #263248; font-size: 12px; }
.finished-label-component-picker > span { color: #667085; font-size: 11px; font-weight: 700; white-space: nowrap; }
.finished-label-component-name { min-width: 180px; color: #172033; font-weight: 800; }
.finished-label-component-sub { display: block; margin-top: 2px; color: #7c8492; font-size: 10px; font-weight: 500; }
.finished-label-component-part { color: #223047; font-family: Consolas, "SFMono-Regular", monospace; font-weight: 700; white-space: nowrap; }
.finished-label-component-rate { display: inline-flex; border-radius: 999px; padding: 3px 7px; background: #edf6f0; color: #24603b; font-size: 10px; font-weight: 800; white-space: nowrap; }
.finished-label-component-rate.default { background: #dff3e5; color: #15592f; }
.finished-label-component-empty { padding: 18px 10px !important; color: #7c8492; text-align: center; }
.finished-label-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 10px 0 0; background: linear-gradient(rgba(246,248,251,0), #f6f8fb 35%); }
.finished-label-history-row { border: 1px solid #edf0f4; border-radius: 8px; background: #fff; padding: 9px 10px; }
.finished-label-history-row.active { border-color: #4f8ef7; box-shadow: 0 0 0 2px rgba(79, 142, 247, .12); background: #f7faff; }
.finished-label-history-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 700; }
.finished-label-history-main > span:first-child { min-width: 0; font-family: Consolas, "SFMono-Regular", monospace; white-space: normal; overflow-wrap: anywhere; }
.finished-label-history-part-numbers { display: grid; gap: 3px; margin: 6px 0 0; font-size: 11px; line-height: 1.45; }
.finished-label-history-part-numbers > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 6px; }
.finished-label-history-part-numbers dt { color: #667085; overflow-wrap: anywhere; }
.finished-label-history-part-numbers dd { min-width: 0; margin: 0; color: #344054; font-weight: 600; overflow-wrap: anywhere; }
.finished-label-history-sub { font-size: 11px; color: #7c8492; margin-top: 4px; line-height: 1.45; word-break: break-word; }
.finished-label-history-print-state { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; border-left: 3px solid #4876a8; padding: 7px 8px; background: #f3f7fb; color: #344054; font-size: 11px; line-height: 1.45; }
.finished-label-history-print-state > div { min-width: 0; }
.finished-label-history-print-state strong, .finished-label-history-print-state span { display: block; }
.finished-label-history-print-state strong { font-size: 11px; }
.finished-label-history-print-state span { margin-top: 2px; color: #5c6878; overflow-wrap: anywhere; }
.finished-label-history-print-state.stopped { border-left-color: #b7791f; background: #fff8e8; color: #744c0b; }
.finished-label-history-print-state.printing { border-left-color: #2b6cb0; background: #edf6ff; color: #184f82; }
.finished-label-history-print-state.sent { border-left-color: #27825a; background: #edf8f2; color: #1f6849; }
.finished-label-history-print-state.error { border-left-color: #c2413a; background: #fff1f0; color: #9c2f2a; }
.finished-label-history-print-state .btn-sm-edit { flex: 0 0 auto; }
.finished-label-help { font-size: 11px; color: #7c8492; line-height: 1.55; margin-top: 8px; }
.finished-label-serial-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; border: 1px solid #b9d8c5; border-radius: 8px; padding: 9px 11px; background: #f1f8f4; color: #315d43; font-size: 11px; line-height: 1.5; }
.finished-label-serial-notice strong { flex: 0 0 auto; color: #18492e; font-size: 12px; }
.finished-box-label-guide { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; margin-bottom: 12px; border: 1px solid #cbd8e8; border-radius: 8px; padding: 10px 12px; background: #f4f8fd; color: #4c6078; font-size: 11px; line-height: 1.55; }
.finished-box-label-guide strong { color: #173d6c; font-size: 12px; }
.finished-label-layout-panel { margin-bottom: 12px; border: 1px solid #dfe4eb; border-radius: 10px; padding: 12px; background: #f8fafc; }
.finished-label-layout-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.finished-label-layout-head h4 { margin: 0; color: #172033; font-size: 13px; font-weight: 800; }
.finished-label-layout-head p { max-width: 620px; margin: 4px 0 0; color: #697386; font-size: 11px; line-height: 1.45; }
.finished-label-layout-badges { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.finished-label-layout-badges span { border: 1px solid #b9c5d5; border-radius: 999px; padding: 3px 8px; background: #fff; color: #344054; font-size: 10px; font-weight: 800; white-space: nowrap; }
.finished-label-layout-stage { display: grid; grid-template-columns: 32px max-content; grid-template-rows: 24px max-content; margin-top: 12px; overflow-x: auto; border: 1px solid #d9dee7; border-radius: 8px; padding: 12px 16px 16px 10px; background-color: #eef1f5; background-image: linear-gradient(#e3e7ed 1px, transparent 1px), linear-gradient(90deg, #e3e7ed 1px, transparent 1px); background-size: 10px 10px; }
.finished-label-layout-width { grid-column: 2; grid-row: 1; position: relative; width: 450px; border-top: 1px solid #5e6878; color: #465061; text-align: center; }
.finished-label-layout-width::before, .finished-label-layout-width::after { position: absolute; top: -4px; width: 1px; height: 8px; background: #5e6878; content: ""; }
.finished-label-layout-width::before { left: 0; }
.finished-label-layout-width::after { right: 0; }
.finished-label-layout-width span { position: relative; top: -9px; padding: 0 7px; background: #eef1f5; font-size: 10px; font-weight: 800; }
.finished-label-layout-height { grid-column: 1; grid-row: 2; position: relative; height: 200px; border-left: 1px solid #5e6878; color: #465061; }
.finished-label-layout-height::before, .finished-label-layout-height::after { position: absolute; left: -4px; width: 8px; height: 1px; background: #5e6878; content: ""; }
.finished-label-layout-height::before { top: 0; }
.finished-label-layout-height::after { bottom: 0; }
.finished-label-layout-height span { position: absolute; top: 50%; left: 1px; padding: 4px 0; background: #eef1f5; font-size: 10px; font-weight: 800; line-height: 1; writing-mode: vertical-rl; transform: translateY(-50%); }
.finished-label-layout-preview { grid-column: 2; grid-row: 2; width: 450px; height: 200px; box-shadow: 0 5px 16px rgba(20, 30, 46, .17); background: #fff; }
.finished-label-layout-preview .serial-label { width: 450px; height: 200px; overflow: hidden; border: 2px solid #000; padding: 7px 8px; background: #fff; color: #000; font-family: Arial, "Noto Sans JP", sans-serif; }
.finished-label-layout-preview .serial-label-head { display: flex; align-items: center; justify-content: space-between; height: 31px; border-bottom: 2px solid #000; line-height: 1; }
.finished-label-layout-preview .serial-label-head strong { font-size: 18px; font-weight: 900; letter-spacing: .11em; }
.finished-label-layout-preview .serial-label-head span { font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.finished-label-layout-preview .serial-label-body { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 8px; align-items: center; height: 149px; }
.finished-label-layout-preview .serial-label-qr { display: block; width: 130px; height: 130px; image-rendering: pixelated; }
.finished-label-layout-preview .serial-label-copy { min-width: 0; overflow: hidden; }
.finished-label-layout-preview .serial-label-field-name { font-size: 9px; font-weight: 900; letter-spacing: .09em; line-height: 1; }
.finished-label-layout-preview .serial-label-product { overflow: hidden; margin-top: 4px; font-size: 20px; font-weight: 900; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.finished-label-layout-preview .serial-label-product.compact { font-size: 17px; letter-spacing: -.02em; }
.finished-label-layout-preview .serial-label-product.long { font-size: 14px; letter-spacing: -.035em; }
.finished-label-layout-preview .serial-label-rule { margin: 8px 0 7px; border-top: 2px solid #000; }
.finished-label-layout-preview .serial-label-number { margin-top: 5px; font-family: Consolas, "Courier New", monospace; font-size: 24px; font-weight: 900; letter-spacing: -.035em; line-height: 1; white-space: nowrap; }
.finished-label-toolbar > div, .finished-label-issued-actions, .finished-label-history-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.finished-box-label-layout-panel { border-color: #cbd8e8; background: #f7faff; }
.finished-box-label-layout-stage { display: grid; grid-template-columns: 32px max-content; grid-template-rows: 24px max-content; margin-top: 12px; overflow: auto; border: 1px solid #d9dee7; border-radius: 8px; padding: 12px 16px 16px 10px; background-color: #eef1f5; background-image: linear-gradient(#e3e7ed 1px, transparent 1px), linear-gradient(90deg, #e3e7ed 1px, transparent 1px); background-size: 10px 10px; }
.finished-box-label-layout-width { grid-column: 2; grid-row: 1; position: relative; width: 480px; border-top: 1px solid #5e6878; color: #465061; text-align: center; }
.finished-box-label-layout-width::before, .finished-box-label-layout-width::after { position: absolute; top: -4px; width: 1px; height: 8px; background: #5e6878; content: ""; }
.finished-box-label-layout-width::before { left: 0; }
.finished-box-label-layout-width::after { right: 0; }
.finished-box-label-layout-width span { position: relative; top: -9px; padding: 0 7px; background: #eef1f5; font-size: 10px; font-weight: 800; }
.finished-box-label-layout-height { grid-column: 1; grid-row: 2; position: relative; height: 360px; border-left: 1px solid #5e6878; color: #465061; }
.finished-box-label-layout-height::before, .finished-box-label-layout-height::after { position: absolute; left: -4px; width: 8px; height: 1px; background: #5e6878; content: ""; }
.finished-box-label-layout-height::before { top: 0; }
.finished-box-label-layout-height::after { bottom: 0; }
.finished-box-label-layout-height span { position: absolute; top: 50%; left: 1px; padding: 4px 0; background: #eef1f5; font-size: 10px; font-weight: 800; line-height: 1; writing-mode: vertical-rl; transform: translateY(-50%); }
.finished-box-label-layout-preview { grid-column: 2; grid-row: 2; width: 480px; height: 360px; box-shadow: 0 5px 16px rgba(20, 30, 46, .17); background: #fff; }
.finished-box-label-layout-preview .box-product-label { width: 480px; height: 360px; overflow: hidden; border: 2px solid #000; padding: 10px; background: #fff; color: #000; font-family: Arial, "Noto Sans JP", sans-serif; }
.finished-box-label-layout-preview .box-product-label-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 11px; height: 40px; border-bottom: 2px solid #000; line-height: 1; }
.finished-box-label-layout-preview .box-product-label-head strong { font-size: 25px; font-weight: 900; letter-spacing: .12em; }
.finished-box-label-layout-preview .box-product-label-head span { font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.finished-box-label-layout-preview .box-product-label-head em { overflow: hidden; font-size: 12px; font-style: normal; font-weight: 900; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.finished-box-label-layout-preview .box-product-label-number { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: end; gap: 8px; height: 46px; padding-top: 5px; }
.finished-box-label-layout-preview .box-product-label-number > span { padding-bottom: 4px; font-size: 9px; font-weight: 900; letter-spacing: .06em; white-space: nowrap; }
.finished-box-label-layout-preview .box-product-label-part { overflow: hidden; font-family: Consolas, "Courier New", monospace; font-size: 29px; font-weight: 900; letter-spacing: -.025em; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.finished-box-label-layout-preview .box-product-label-part.compact { font-size: 25px; }
.finished-box-label-layout-preview .box-product-label-part.long { font-size: 21px; letter-spacing: -.04em; }
.finished-box-label-layout-preview .box-product-label-barcode { display: grid; grid-template-rows: 72px 14px; height: 91px; padding: 2px 4px 3px; text-align: center; }
.finished-box-label-layout-preview .box-product-label-barcode img { display: block; width: 100%; height: 72px; image-rendering: crisp-edges; }
.finished-box-label-layout-preview .box-product-label-barcode strong { overflow: hidden; font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.finished-box-label-layout-preview .box-product-label-lower { display: grid; grid-template-columns: minmax(0, 1fr) 134px; gap: 9px; height: 159px; border-top: 2px solid #000; padding-top: 7px; }
.finished-box-label-layout-preview .box-product-label-details { display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); min-width: 0; }
.finished-box-label-layout-preview .box-product-label-details > div { min-width: 0; overflow: hidden; border-bottom: 1px solid #000; padding: 3px 0; }
.finished-box-label-layout-preview .box-product-label-details > div:last-child { border-bottom: 0; }
.finished-box-label-layout-preview .box-product-label-details span { display: block; font-size: 8px; font-weight: 900; letter-spacing: .05em; line-height: 1; }
.finished-box-label-layout-preview .box-product-label-details strong { display: block; overflow: hidden; margin-top: 3px; font-size: 14px; font-weight: 900; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.finished-box-label-layout-preview .box-product-label-serial { display: flex; align-items: center; flex-direction: column; min-width: 0; border-left: 2px solid #000; padding-left: 8px; }
.finished-box-label-layout-preview .box-product-label-serial img { display: block; width: 112px; height: 112px; image-rendering: pixelated; }
.finished-box-label-layout-preview .box-product-label-serial span { margin-top: 3px; font-size: 8px; font-weight: 900; letter-spacing: .05em; line-height: 1; }
.finished-box-label-layout-preview .box-product-label-serial strong { margin-top: 4px; font-family: Consolas, "Courier New", monospace; font-size: 13px; font-weight: 900; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }
.finished-label-layout-error { display: grid; height: 100%; place-items: center; color: #a33b2e; font-size: 12px; font-weight: 700; }
.finished-label-layout-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; color: #5f6b7a; font-size: 10px; line-height: 1.4; }
.finished-label-layout-foot strong { color: #172033; font-family: Consolas, "SFMono-Regular", monospace; font-size: 11px; }
.finished-label-layout-sample { border-radius: 4px; padding: 3px 6px; background: #fff3cd; color: #6d5310; font-weight: 800; }
.finished-label-issued-result { display: none; margin-top: 12px; border: 1px solid #9ec9ad; border-radius: 8px; padding: 11px; background: #f3faf6; }
.finished-label-issued-result.show { display: block; }
.finished-label-issued-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.finished-label-issued-head > div { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.finished-label-issued-head strong { color: #16452b; font-size: 13px; }
.finished-label-issued-head span { color: #547061; font-size: 11px; font-weight: 700; }
.finished-label-issued-meta { margin-top: 4px; color: #547061; font-size: 11px; }
.finished-label-serial-list { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.finished-label-serial-chip { border: 1px solid #bad7c4; border-radius: 5px; padding: 4px 7px; background: #fff; color: #183f29; font-family: Consolas, "SFMono-Regular", monospace; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.finished-label-history-serial { margin: 0; color: #173f2a; font-family: Consolas, "SFMono-Regular", monospace; font-size: 12px; font-weight: 800; word-break: break-word; }
.finished-box-label-print-status { display: inline-flex; align-items: center; min-height: 22px; border-radius: 999px; padding: 3px 8px; background: #e8f6ed; color: #17603a; font-size: 9px; font-weight: 900; white-space: nowrap; }
.finished-box-label-print-status.reprint { background: #fff3dd; color: #8a4b08; }
.finished-label-mode-card.station { border-color: #b9cbe1; background: #f5f8fc; }
.finished-label-mode-card.station .finished-label-mode-size { background: #e7eef9; color: #27496f; }
.finished-label-mobile-print-rule { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; border: 1px solid #9fc0ed; border-radius: 8px; padding: 7px 9px; background: #eef6ff; color: #1f4d7a; font-size: 11px; line-height: 1.4; }
.finished-label-mobile-print-rule[hidden] { display: none; }
.finished-label-mobile-print-rule strong { flex: 0 0 auto; border-radius: 999px; padding: 3px 7px; background: #276fd2; color: #fff; font-size: 10px; }
.finished-label-mobile-print-rule.waiting { border-color: #e3b45d; background: #fff8e8; color: #765019; }
.finished-label-mobile-print-rule.waiting strong { background: #b97814; }
.finished-label-mobile-print-rule.success { border-color: #83c69d; background: #ecf9f1; color: #17603a; }
.finished-label-mobile-print-rule.success strong { background: #21854e; }
.finished-label-mobile-print-rule.error { border-color: #e3a0a0; background: #fff0f0; color: #8e2929; }
.finished-label-mobile-print-rule.error strong { background: #bb3a3a; }
.finished-label-mobile-print-copy { flex: 1 1 auto; min-width: 0; }
.finished-label-mobile-destination { display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.finished-label-mobile-destination-label { flex: 0 0 auto; color: #173f69; font-weight: 900; }
.finished-label-mobile-destination-options { display: flex; flex: 1 1 auto; gap: 6px; min-width: 0; }
.finished-label-mobile-destination-option { flex: 1 1 140px; min-width: 0; border: 1px solid #a9bfdc; border-radius: 7px; padding: 6px 8px; background: #fff; color: #213f62; text-align: left; cursor: pointer; }
.finished-label-mobile-destination-option.active { border-color: #2c72d6; background: #e8f2ff; box-shadow: inset 0 0 0 1px #2c72d6; }
.finished-label-mobile-destination-option-name { display: block; overflow: hidden; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.finished-label-mobile-destination-option-state { display: block; margin-top: 2px; font-size: 9px; font-weight: 800; }
.finished-label-mobile-destination-option.ready .finished-label-mobile-destination-option-state { color: #17603a; }
.finished-label-mobile-destination-option.error .finished-label-mobile-destination-option-state { color: #9b2f2f; }
.finished-label-mobile-destination-option.stopped .finished-label-mobile-destination-option-state { color: #687485; }
@media (max-width: 600px) {
  .finished-label-mobile-print-rule { align-items: stretch; flex-direction: column; }
  .finished-label-mobile-destination { align-items: stretch; flex-direction: column; gap: 4px; }
  .finished-label-mobile-destination-options { flex-direction: column; }
  .finished-label-mobile-destination-option { flex-basis: auto; width: 100%; }
}
.finished-label-print-station { width: 100%; min-height: 0; padding: 10px; }
.finished-label-print-station[hidden] { display: none; }
.finished-label-device-setup { margin-bottom: 12px; border: 1px solid #c9d7cf; border-radius: 8px; padding: 16px; background: #fff; }
.finished-label-device-setup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.finished-label-device-setup-head > div:first-child { min-width: 0; }
.finished-label-device-setup-head h2 { margin: 7px 0 3px; color: #163a2d; font-size: 19px; }
.finished-label-device-setup-head p { margin: 0; color: #5e6f67; font-size: 11px; line-height: 1.55; }
.finished-label-device-profile-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.finished-label-device-profile { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-width: 0; border-top: 1px solid #dce5e0; border-bottom: 1px solid #dce5e0; padding: 10px 4px; }
.finished-label-device-profile > div:first-child { display: flex; align-items: center; gap: 9px; min-width: 0; }
.finished-label-device-profile > div:first-child strong { overflow: hidden; color: #233a31; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.finished-label-device-profile-state { display: inline-flex; align-items: center; min-height: 24px; border-radius: 4px; padding: 3px 7px; background: #eef1f3; color: #64707a; font-size: 10px; font-weight: 900; white-space: nowrap; }
.finished-label-device-profile-state.ready { background: #e4f4e9; color: #1c663b; }
.finished-label-device-profile-state.error { background: #ffeaea; color: #9c2c2c; }
.finished-label-device-profile-actions { display: flex; align-items: center; gap: 4px; }
.finished-label-device-profile-actions a { border: 1px solid #aebfc8; border-radius: 5px; padding: 5px 7px; background: #fff; color: #244d68; font-size: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.finished-label-device-first-run { margin: 10px 0 0; border-left: 3px solid #d69a25; padding-left: 9px; color: #6f5828; font-size: 10px; line-height: 1.5; }
.finished-label-station-shell { display: grid; grid-template-columns: minmax(430px, .85fr) minmax(480px, 1.15fr); gap: 12px; min-height: 0; }
.finished-label-station-compatibility { min-width: 0; border: 1px solid #d9e0e8; border-radius: 8px; background: #f7f9fb; }
.finished-label-station-compatibility > summary { padding: 12px 14px; color: #445267; font-size: 12px; font-weight: 800; cursor: pointer; }
.finished-label-station-compatibility[open] > summary { border-bottom: 1px solid #d9e0e8; }
.finished-label-station-compatibility .finished-label-station-control { border: 0; border-radius: 0 0 8px 8px; }
.finished-label-station-control, .finished-label-station-history-card { min-width: 0; }
.finished-label-station-state { display: inline-flex; align-items: center; min-height: 26px; border-radius: 999px; padding: 4px 10px; font-size: 10px; font-weight: 900; }
.finished-label-station-state.stopped { background: #edf0f4; color: #657080; }
.finished-label-station-state.waiting { background: #e8f2ff; color: #1f5c9c; }
.finished-label-station-state.printing { background: #fff3d6; color: #895300; }
.finished-label-station-state.error { background: #ffe8e8; color: #a62828; }
.finished-label-station-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 12px 0; }
.finished-label-station-settings label { display: flex; flex-direction: column; gap: 4px; color: #536071; font-size: 10px; font-weight: 800; }
.finished-label-station-settings select, .finished-label-station-settings input { min-height: 38px; border: 1px solid #ccd5e1; border-radius: 7px; padding: 7px 9px; background: #fff; color: #1b2735; font-size: 12px; }
.finished-label-station-settings input[readonly] { background: #f4f6f8; font-family: Consolas, "SFMono-Regular", monospace; font-weight: 800; }
.finished-label-station-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.finished-label-station-message { min-height: 38px; margin-top: 10px; border-radius: 7px; padding: 9px 10px; background: #f4f7fb; color: #435267; font-size: 11px; line-height: 1.45; }
.finished-label-station-message.error { border: 1px solid #efb0b0; background: #fff0f0; color: #9f2424; }
.finished-label-station-message.success { border: 1px solid #a9d4b8; background: #eefaf2; color: #21633a; }
.finished-label-station-note { margin-top: 9px; color: #7a8492; font-size: 10px; line-height: 1.5; }
.finished-label-station-frame { position: fixed; left: -10000px; top: 0; width: 120mm; height: 120mm; border: 0; opacity: .01; pointer-events: none; }
.finished-label-station-history { display: flex; flex-direction: column; gap: 7px; max-height: calc(100vh - 190px); overflow-y: auto; }
.finished-label-station-job { border: 1px solid #e0e5ec; border-radius: 8px; padding: 9px 10px; background: #fff; }
.finished-label-station-job-head, .finished-label-station-job-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.finished-label-station-job-head strong { color: #172435; font-size: 12px; }
.finished-label-station-job-head span { border-radius: 999px; padding: 3px 7px; background: #edf1f6; color: #536071; font-size: 9px; font-weight: 900; }
.finished-label-station-job-head span.queued, .finished-label-station-job-head span.claimed { background: #e7f1ff; color: #1e5f9d; }
.finished-label-station-job-head span.sent { background: #e7f6ec; color: #24653b; }
.finished-label-station-job-head span.error { background: #ffe8e8; color: #a62828; }
.finished-label-station-job-main { margin-top: 5px; color: #263548; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.finished-label-station-job-sub { margin-top: 4px; color: #7b8491; font-size: 9px; line-height: 1.4; }
.finished-label-station-job-error { margin-top: 5px; color: #a62828; font-size: 10px; }
.finished-label-station-job-actions { margin-top: 7px; }
@media (max-width: 900px) {
  .finished-label-setup-strip, .finished-label-device-setup-head { align-items: stretch; flex-direction: column; }
  .finished-label-setup-actions, .finished-label-device-actions { justify-content: flex-start; }
  .finished-label-device-profile-list { grid-template-columns: 1fr; }
  .finished-label-device-profile { grid-template-columns: minmax(0, 1fr) auto; }
  .finished-label-device-profile-actions { grid-column: 1 / -1; }
  .finished-label-station-shell { grid-template-columns: 1fr; }
  .finished-label-station-settings { grid-template-columns: 1fr; }
  .finished-label-station-history { max-height: none; }
}
@media (max-width: 600px) {
  .finished-label-setup-guide { align-items: end; padding: 0; }
  .finished-label-setup-guide-card { width: 100%; max-height: calc(100dvh - 12px); border-radius: 8px 8px 0 0; padding: 18px 15px 14px; }
  .finished-label-setup-guide-card > h2 { font-size: 19px; }
  .finished-label-setup-guide-card > p { font-size: 12px; }
  .finished-label-setup-guide-tabs button { min-height: 48px; padding: 8px 9px; font-size: 12px; }
  .finished-label-setup-guide-steps > li { grid-template-columns: 30px minmax(0, 1fr); gap: 9px; padding: 11px 0; }
  .finished-label-setup-guide-step-number { width: 28px; height: 28px; }
  .finished-label-setup-guide-steps a, .finished-label-setup-guide-panel > .btn-primary { width: 100%; }
  .finished-label-setup-detection { grid-template-columns: 12px minmax(0, 1fr); }
  .finished-label-setup-detection > button { grid-column: 2; justify-self: start; }
}
@media (min-width: 1180px) and (min-height: 680px) {
  #screen-finished-label-mgmt.active { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  #screen-finished-label-mgmt .finished-label-body { min-height: 0; padding: 10px; }
  #screen-finished-label-mgmt .finished-label-mode-bar { padding-bottom: 6px; }
  #screen-finished-label-mgmt .finished-label-mode-bar .back-btn { padding: 5px 8px; font-size: 11px; }
  #screen-finished-label-mgmt .finished-label-shell { grid-template-columns: 280px minmax(0, 1fr); gap: 10px; overflow: hidden; }
  #screen-finished-label-mgmt .finished-label-left { gap: 8px; overflow: hidden; }
  #screen-finished-label-mgmt .finished-label-left > .finished-label-card { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; padding: 8px; overflow: hidden; }
  #screen-finished-label-mgmt .is-product-mode .finished-label-left > .finished-label-card:first-child { flex-grow: 1.18; }
  #screen-finished-label-mgmt .finished-label-results,
  #screen-finished-label-mgmt .finished-label-history-list { min-height: 0; overflow-y: auto; }
  #screen-finished-label-mgmt .finished-label-result { padding: 7px 8px; }
  #screen-finished-label-mgmt .finished-label-result-title { font-size: 12px; }
  #screen-finished-label-mgmt .finished-label-result-number-row { margin-top: 2px; font-size: 10px; line-height: 1.3; }
  #screen-finished-label-mgmt .finished-label-result-sub { margin-top: 2px; font-size: 10px; line-height: 1.3; }
  #screen-finished-label-mgmt .finished-label-editor { display: grid; grid-template-columns: minmax(470px, 1.08fr) minmax(360px, .92fr); gap: 10px; min-width: 0; overflow: hidden; }
  #screen-finished-label-mgmt .finished-label-editor > .finished-label-card { min-width: 0; min-height: 0; padding: 8px; overflow: hidden; }
  #screen-finished-label-mgmt .finished-label-workspace.is-box-mode .finished-label-editor > .finished-label-card:first-child { grid-column: 1 / -1; }
  #screen-finished-label-mgmt .finished-label-editor > .finished-label-card[data-finished-label-product-only] { display: flex; flex-direction: column; }
  #screen-finished-label-mgmt .finished-label-editor > .finished-label-card[data-finished-label-product-only] .finished-label-table-wrap { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; }
  #screen-finished-label-mgmt .finished-label-card h3 { margin-bottom: 5px; font-size: 12px; }
  #screen-finished-label-mgmt .finished-label-toolbar { gap: 5px; margin-bottom: 5px; }
  #screen-finished-label-mgmt .finished-label-toolbar > div { gap: 4px; }
  #screen-finished-label-mgmt .finished-label-toolbar button { min-height: 28px; padding: 5px 7px; font-size: 10px; }
  #screen-finished-label-mgmt .finished-label-toolbar .finished-label-print-action { min-height: 34px; padding: 6px 12px; font-size: 14px; }
  #screen-finished-label-mgmt #btn-finished-label-preview:disabled { display: none; }
  #screen-finished-label-mgmt .finished-label-serial-notice { gap: 7px; margin-bottom: 6px; padding: 5px 7px; line-height: 1.3; }
  #screen-finished-label-mgmt .finished-label-serial-notice strong { font-size: 10px; }
  #screen-finished-label-mgmt .finished-label-serial-notice span { font-size: 9px; }
  #screen-finished-label-mgmt .finished-label-layout-panel { margin-bottom: 6px; padding: 7px; }
  #screen-finished-label-mgmt .finished-label-layout-head { gap: 8px; }
  #screen-finished-label-mgmt .finished-label-layout-head h4 { font-size: 11px; }
  #screen-finished-label-mgmt .finished-label-layout-head p { display: none; }
  #screen-finished-label-mgmt .finished-label-layout-badges { gap: 3px; }
  #screen-finished-label-mgmt .finished-label-layout-badges span { padding: 2px 5px; font-size: 8px; }
  #screen-finished-label-mgmt .finished-label-layout-stage { grid-template-columns: 22px 270px; grid-template-rows: 16px 120px; justify-content: center; margin-top: 6px; padding: 7px 9px 9px 5px; overflow: hidden; }
  #screen-finished-label-mgmt .finished-label-layout-width { width: 270px; }
  #screen-finished-label-mgmt .finished-label-layout-height { height: 120px; }
  #screen-finished-label-mgmt .finished-label-layout-preview { width: 270px; height: 120px; overflow: hidden; }
  #screen-finished-label-mgmt .finished-label-layout-preview .serial-label { width: 450px; height: 200px; transform: scale(.6); transform-origin: 0 0; }
  #screen-finished-label-mgmt .finished-label-layout-foot { gap: 5px; margin-top: 4px; font-size: 8px; }
  #screen-finished-label-mgmt .finished-label-layout-foot strong { font-size: 9px; }
  #screen-finished-label-mgmt .finished-label-layout-sample { padding: 2px 4px; }
  #screen-finished-label-mgmt .finished-label-selected { gap: 4px; margin-bottom: 6px; }
  #screen-finished-label-mgmt .finished-label-selected-cell { min-height: 40px; padding: 5px 6px; }
  #screen-finished-label-mgmt .finished-label-selected-label { margin-bottom: 1px; font-size: 9px; }
  #screen-finished-label-mgmt .finished-label-selected-value { font-size: 11px; }
  #screen-finished-label-mgmt .finished-label-form-grid { gap: 5px; }
  #screen-finished-label-mgmt .finished-label-field label { margin-bottom: 2px; font-size: 9px; }
  #screen-finished-label-mgmt .finished-label-field input,
  #screen-finished-label-mgmt .finished-label-field select,
  #screen-finished-label-mgmt .finished-label-field textarea { min-height: 28px; padding: 4px 6px; font-size: 11px; }
  #screen-finished-label-mgmt .finished-label-component-picker { grid-template-columns: minmax(0, 1fr) auto; gap: 5px; margin: 5px 0; }
  #screen-finished-label-mgmt .finished-label-component-picker > span { grid-column: 1 / -1; font-size: 9px; }
  #screen-finished-label-mgmt .finished-label-component-picker select { padding: 5px 6px; font-size: 10px; }
  #screen-finished-label-mgmt .finished-label-table { min-width: 0; table-layout: fixed; font-size: 9px; }
  #screen-finished-label-mgmt .finished-label-table th,
  #screen-finished-label-mgmt .finished-label-table td { overflow: hidden; padding: 4px; overflow-wrap: anywhere; }
  #screen-finished-label-mgmt .finished-label-table th:nth-child(1) { width: 28px; }
  #screen-finished-label-mgmt .finished-label-table th:nth-child(2) { width: 22%; }
  #screen-finished-label-mgmt .finished-label-table th:nth-child(3) { width: 15%; }
  #screen-finished-label-mgmt .finished-label-table th:nth-child(4) { width: 28%; }
  #screen-finished-label-mgmt .finished-label-table th:nth-child(5) { width: 48px; }
  #screen-finished-label-mgmt .finished-label-table th:nth-child(6) { width: 32px; }
  #screen-finished-label-mgmt .finished-label-table th:nth-child(7) { width: 42px; }
  #screen-finished-label-mgmt .finished-label-component-name { display: block; min-width: 0; }
  #screen-finished-label-mgmt .finished-label-component-part { font-size: 8px; white-space: normal; }
  #screen-finished-label-mgmt .finished-label-table button { min-height: 24px; padding: 3px 4px; font-size: 8px; }
  #screen-finished-label-mgmt .finished-box-label-layout-stage { grid-template-columns: 22px 320px; grid-template-rows: 16px 240px; justify-content: center; margin-top: 6px; padding: 7px 9px 9px 5px; overflow: hidden; }
  #screen-finished-label-mgmt .finished-box-label-layout-width { width: 320px; }
  #screen-finished-label-mgmt .finished-box-label-layout-height { height: 240px; }
  #screen-finished-label-mgmt .finished-box-label-layout-preview { width: 320px; height: 240px; overflow: hidden; }
  #screen-finished-label-mgmt .finished-box-label-layout-preview .box-product-label { width: 480px; height: 360px; transform: scale(.666667); transform-origin: 0 0; }
}
.finished-shipment-body { max-width: none; padding: 16px; overflow: hidden; }
.finished-shipment-shell { display: grid; grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr); gap: 14px; width: 100%; min-width: 0; height: 100%; min-height: 0; }
.finished-shipment-left, .finished-shipment-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; overflow: auto; }
#screen-finished-product-shipping .finished-label-card { min-width: 0; }
#screen-finished-product-shipping .finished-label-table-wrap { width: 100%; max-width: 100%; }
#screen-finished-product-shipping .finished-label-search-row button { flex: 0 0 auto; }
.finished-shipment-dispatch-load { border-left: 3px solid #2d6fae; }
#screen-finished-product-shipping .finished-shipment-dispatch-load[hidden] { display: none !important; }
.finished-shipment-scan-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: stretch; }
.finished-shipment-scan-row input { min-width: 0; }
.finished-shipment-camera-button { min-height: 38px; border: 1px solid #2d6fae; border-radius: 6px; padding: 7px 12px; background: #eef6ff; color: #1f5e9c; font-size: 11px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.finished-shipment-camera-button::before { content: "\25CE"; margin-right: 5px; font-size: 12px; }
.finished-shipment-camera-button:hover { background: #dfeeff; }
.finished-shipment-camera-button:focus-visible { outline: 3px solid rgba(45, 111, 174, .3); outline-offset: 2px; }
.finished-shipment-camera-card { width: min(620px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; overflow: auto; }
.finished-shipment-camera-stage { position: relative; margin: 14px 20px 0; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: #101722; }
.finished-shipment-camera-stage video { display: block; width: 100%; height: 100%; object-fit: cover; }
.finished-shipment-camera-guide { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.finished-shipment-camera-guide-box { width: min(76%, 420px); height: min(46%, 220px); border: 2px solid rgba(255, 255, 255, .95); border-radius: 12px; box-shadow: 0 0 0 999px rgba(8, 15, 26, .34); }
.serial-qr-mode .finished-shipment-camera-guide-box { width: min(62%, 320px); height: auto; aspect-ratio: 1; }
.finished-shipment-camera-guide-line { position: absolute; width: min(58%, 320px); height: 2px; border-radius: 999px; background: #ef3340; box-shadow: 0 0 9px rgba(239, 51, 64, .8); }
.serial-qr-mode .finished-shipment-camera-guide-line { width: min(50%, 260px); }
.finished-shipment-camera-status { min-height: 38px; margin: 10px 20px 0; border-left: 3px solid #2d6fae; padding: 7px 9px; background: #f2f7fc; color: #334d69; font-size: 11px; line-height: 1.5; }
.finished-shipment-candidate-search { margin-top: 8px; }
.finished-shipment-candidates { display: flex; flex-direction: column; gap: 6px; max-height: 280px; margin-top: 9px; overflow: auto; }
.finished-shipment-candidate { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #d9e1e9; padding: 8px 9px; background: #fff; }
.finished-shipment-candidate > div { min-width: 0; }
.finished-shipment-candidate strong,
.finished-shipment-candidate span { display: block; overflow-wrap: anywhere; }
.finished-shipment-candidate strong { color: #173f71; font: 700 12px Consolas, "SFMono-Regular", monospace; }
.finished-shipment-candidate span { margin-top: 2px; color: #687386; font-size: 9px; }
.finished-shipment-match-badge { display: inline-flex !important; width: fit-content; margin: 3px 0 0; border: 1px solid #d0a844; border-radius: 4px; padding: 1px 5px; background: #fff7d8; color: #765500 !important; font-size: 9px !important; font-weight: 800; line-height: 1.35; white-space: nowrap; }
.finished-shipment-candidate button,
.finished-shipment-order-item button { min-height: 30px; border: 1px solid #2d6fae; border-radius: 5px; padding: 0 9px; background: #fff; color: #225b94; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.finished-shipment-candidate button:hover,
.finished-shipment-order-item button:hover { background: #edf5fc; }
.finished-shipment-message { display: none; margin-top: 9px; border-radius: 7px; padding: 8px 10px; font-size: 12px; line-height: 1.45; }
.finished-shipment-message.show { display: block; }
.finished-shipment-message.success { border: 1px solid #acd4ba; background: #f1f8f4; color: #24593a; }
.finished-shipment-message.error { border: 1px solid #edb5b5; background: #fff4f4; color: #9b2424; }
.finished-shipment-lookup { margin-top: 9px; }
.finished-shipment-lookup:empty { display: none; }
.finished-shipment-lookup:not(:empty) { border: 1px solid #cbd8e8; border-radius: 8px; padding: 10px; background: #f7faff; }
.finished-shipment-lookup.picking-ok:not(:empty) { border-color: #86c99c; background: #f1faf4; }
.finished-shipment-lookup.picking-ng:not(:empty) { border-color: #e49393; background: #fff3f3; box-shadow: inset 4px 0 0 #c62828; }
.finished-shipment-lookup-head, .finished-shipment-history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.finished-shipment-lookup-head strong, .finished-shipment-serial { font-family: Consolas, "SFMono-Regular", monospace; color: #163d70; letter-spacing: .02em; }
.finished-shipment-lookup-sub, .finished-shipment-history-meta { margin-top: 5px; color: #687386; font-size: 11px; line-height: 1.45; word-break: break-word; }
.finished-shipment-picking-result { display: flex; align-items: flex-start; gap: 9px; margin-top: 9px; border-radius: 6px; padding: 8px 9px; font-size: 11px; line-height: 1.45; }
.finished-shipment-picking-result strong { flex: 0 0 auto; font-size: 12px; }
.finished-shipment-picking-result.picking-ok { background: #daf2e2; color: #1f6038; }
.finished-shipment-picking-result.picking-ng { background: #ffdede; color: #971d1d; }
.finished-shipment-lookup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.finished-shipment-lookup-grid > div { border: 1px solid #e1e8f2; border-radius: 7px; padding: 7px 8px; background: #fff; }
.finished-shipment-lookup-grid span { display: block; color: #7c8492; font-size: 10px; }
.finished-shipment-lookup-grid strong { display: block; margin-top: 3px; color: #1b2638; font-size: 12px; word-break: break-word; }
.finished-shipment-lookup-grid .warranty-active { color: #19703c; }
.finished-shipment-lookup-grid .warranty-expired { color: #a33b2e; }
.finished-shipment-order-context > p { margin: 0; color: #667085; font-size: 11px; line-height: 1.65; }
.finished-shipment-order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.finished-shipment-order-head > div { min-width: 0; }
.finished-shipment-order-head strong { display: block; color: #17243a; font-size: 16px; }
.finished-shipment-order-head span { display: block; margin-top: 3px; color: #4d5969; font-size: 12px; font-weight: 700; }
.finished-shipment-order-head em { border-radius: 5px; padding: 4px 7px; background: #eef3f8; color: #415267; font-size: 10px; font-style: normal; font-weight: 800; white-space: nowrap; }
.finished-shipment-order-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.finished-shipment-order-grid > div { border: 1px solid #dce4ec; padding: 7px 8px; background: #f7f9fb; }
.finished-shipment-order-grid dt { color: #7a8492; font-size: 9px; }
.finished-shipment-order-grid dd { overflow-wrap: anywhere; margin-top: 3px; color: #263548; font-size: 11px; font-weight: 800; }
.finished-shipment-order-items { display: flex; flex-direction: column; margin-top: 10px; border-top: 1px solid #dce4ec; }
.finished-shipment-order-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 54px auto; align-items: center; gap: 10px; border-bottom: 1px solid #e5eaf0; padding: 8px 0; }
.finished-shipment-order-item strong, .finished-shipment-order-item small { display: block; }
.finished-shipment-order-item strong { color: #17243a; font-size: 12px; }
.finished-shipment-order-item small { margin-top: 2px; color: #778292; font-size: 9px; }
.finished-shipment-order-item > span { color: #2c5c46; font-size: 10px; font-weight: 800; }
.finished-shipment-order-item > b { color: #254e87; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.finished-shipment-order-item.complete > b { color: #267142; }
.finished-shipment-order-note { margin-top: 9px; color: #687386; font-size: 10px; line-height: 1.55; }
.finished-shipment-order-note.ready { border-left: 3px solid #2b7a4b; padding: 7px 9px; background: #edf8f1; color: #205e39; font-weight: 800; }
.finished-shipment-count { display: inline-flex; min-width: 24px; justify-content: center; margin-left: 5px; border-radius: 999px; padding: 2px 7px; background: #eaf2ff; color: #174ea6; font-size: 11px; }
.finished-shipment-table { min-width: 0; table-layout: fixed; }
.finished-shipment-table th,
.finished-shipment-table td { overflow-wrap: anywhere; }
.finished-shipment-table th:nth-child(1) { width: 38%; }
.finished-shipment-table th:nth-child(2) { width: 28%; }
.finished-shipment-table th:nth-child(3) { width: auto; }
.finished-shipment-table th:nth-child(4) { width: 52px; text-align: center; }
.finished-shipment-table td:nth-child(4) { text-align: center; }
.finished-shipment-table td:nth-child(4) button { width: 32px; min-width: 32px; min-height: 32px; padding: 0; }
.finished-shipment-table td .finished-shipment-match-badge { margin-top: 4px; }
.finished-shipment-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.finished-shipment-status.available { background: #e9f7ee; color: #21643a; }
.finished-shipment-status.picking-ok { background: #d8f1e0; color: #185f34; }
.finished-shipment-status.picking-ng { background: #ffd9d9; color: #a11919; }
.finished-shipment-status.shipped { background: #eaf2ff; color: #174ea6; }
.finished-shipment-status.cancelled { background: #f2f3f5; color: #666f7d; }
.finished-shipment-status.assigned { background: #fff4d6; color: #76530d; }
.finished-shipment-status.released { background: #f2f3f5; color: #666f7d; }
.finished-shipment-readiness { display: none; margin-top: 12px; border-left: 4px solid #bf7b12; padding: 9px 11px; background: #fff8e8; color: #725016; font-size: 12px; font-weight: 800; line-height: 1.55; }
.finished-shipment-readiness:not(:empty) { display: block; }
.finished-shipment-readiness.ready { border-left-color: #2b7a4b; background: #edf8f1; color: #205e39; }
.finished-shipment-readiness.error { border-left-color: #c62828; background: #fff1f1; color: #8d1f1f; }
.finished-shipment-submit-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 12px; }
.finished-shipment-submit-row .finished-shipment-message { flex: 1; margin-top: 0; }
.finished-shipment-submit-row .btn-primary:disabled { border-color: #c6cdd5; background: #e6e9ed; color: #7f8995; cursor: not-allowed; opacity: 1; }
.finished-shipment-mobile-final-action { display: none; }
.finished-shipment-history { display: flex; flex-direction: column; gap: 9px; }
.finished-shipment-history-section { display: flex; flex-direction: column; gap: 8px; }
.finished-shipment-history-section + .finished-shipment-history-section { margin-top: 5px; border-top: 2px solid #dce4ec; padding-top: 12px; }
.finished-shipment-history-section > h4 { margin: 0; color: #33465e; font-size: 12px; }
.finished-shipment-history-error { border: 1px solid #edb5b5; padding: 8px 10px; background: #fff4f4; color: #9b2424; font-size: 11px; line-height: 1.45; }
.finished-shipment-history-row { border: 1px solid #e3e8ef; border-radius: 8px; padding: 10px; background: #fff; }
.finished-shipment-picking-row { border-left: 4px solid #c58a27; }
.finished-shipment-history-head > div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.finished-shipment-history-head strong { color: #18243a; font-size: 13px; }
.finished-shipment-history-head div span { color: #566176; font-size: 12px; font-weight: 700; }
.finished-shipment-warranty { display: inline-flex; margin-top: 7px; border-radius: 5px; padding: 3px 7px; font-size: 10px; font-weight: 800; }
.finished-shipment-warranty.active { background: #e9f7ee; color: #21643a; }
.finished-shipment-warranty.expired { background: #fff1ed; color: #9a3b2d; }
.finished-shipment-picking-stock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; border-top: 1px solid #e2e7ed; border-bottom: 1px solid #e2e7ed; }
.finished-shipment-picking-stock > div { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 4px; min-width: 0; padding: 7px 8px; }
.finished-shipment-picking-stock > div + div { border-left: 1px solid #e2e7ed; }
.finished-shipment-picking-stock span { overflow: hidden; color: #667386; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.finished-shipment-picking-stock strong { color: #1d344f; font-size: 14px; font-variant-numeric: tabular-nums; }
.finished-shipment-picking-stock small { color: #778292; font-size: 9px; }
.finished-shipment-history-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.finished-shipment-warranty-summary { display: flex; flex-wrap: wrap; gap: 5px; min-height: 34px; align-items: center; border: 1px solid #d9e2ec; border-radius: 6px; padding: 6px 8px; background: #f8fafc; color: #506074; font-size: 10px; font-weight: 700; }
.finished-shipment-warranty-summary span { display: inline-flex; align-items: center; border: 1px solid #c9d8e8; border-radius: 4px; padding: 3px 6px; background: #fff; color: #294e78; line-height: 1.35; }
.finished-shipment-warranty-summary span.replacement { border-color: #dfbd74; background: #fff8e7; color: #775211; }
.finished-shipment-item-warranty { grid-column: 1 / 4; display: flex; align-items: center; gap: 7px; min-width: 0; border-left: 3px solid #4b83bd; padding: 4px 7px; background: #f4f8fc; }
.finished-shipment-item-warranty strong { color: #294f79; font-size: 10px; white-space: nowrap; }
.finished-shipment-item-warranty span { overflow: hidden; color: #596779; font: 700 10px Consolas, "SFMono-Regular", monospace; text-overflow: ellipsis; white-space: nowrap; }
.finished-shipment-item-warranty em { margin-left: auto; border: 1px solid #d6aa53; border-radius: 4px; padding: 2px 5px; color: #76510b; font-size: 9px; font-style: normal; font-weight: 800; white-space: nowrap; }
.finished-shipment-item-warranty.replacement { border-left-color: #c58d1e; background: #fff8e8; }
.finished-shipment-replacement-actions { grid-column: 4; display: flex; gap: 5px; justify-content: flex-end; }
.finished-shipment-replacement-actions button.clear { border-color: #aeb7c3; color: #5f6875; }
.finished-shipment-lookup-replacement { margin-top: 8px; border-left: 3px solid #c58d1e; padding: 6px 8px; background: #fff8e8; color: #76510b; font-size: 10px; font-weight: 800; }
.finished-warranty-policy-card { width: min(760px, calc(100vw - 32px)); max-height: min(880px, calc(100vh - 32px)); padding: 0; overflow: hidden; }
.finished-warranty-policy-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #dce4ec; padding: 18px 20px 14px; background: #f7fafe; }
.finished-warranty-policy-heading > div { min-width: 0; }
.finished-warranty-policy-heading span { color: #2767a6; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.finished-warranty-policy-heading h3 { margin: 4px 0 0; color: #14233a; font-size: 18px; }
.finished-warranty-policy-heading p { margin: 6px 0 0; color: #5e6b7b; font-size: 11px; line-height: 1.55; }
.finished-warranty-policy-heading button { flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid #cbd6e2; border-radius: 5px; background: #fff; color: #445165; cursor: pointer; }
.finished-warranty-policy-table-wrap { max-height: min(58vh, 540px); overflow: auto; padding: 12px 20px 0; }
.finished-warranty-policy-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.finished-warranty-policy-table th, .finished-warranty-policy-table td { border-bottom: 1px solid #e2e7ed; padding: 7px 9px; text-align: left; }
.finished-warranty-policy-table thead th { position: sticky; top: 0; z-index: 1; background: #edf2f7; color: #4d5a6b; font-size: 10px; }
.finished-warranty-policy-table thead th:first-child { width: 48%; }
.finished-warranty-policy-table tbody th strong, .finished-warranty-policy-table tbody th small { display: block; }
.finished-warranty-policy-table tbody th strong { color: #1c2d45; font-size: 11px; }
.finished-warranty-policy-table tbody th small { margin-top: 2px; color: #8590a0; font-size: 9px; }
.finished-warranty-policy-table td label { display: flex; align-items: center; gap: 4px; }
.finished-warranty-policy-table td input { width: 76px; min-height: 32px; border: 1px solid #cbd6e2; border-radius: 5px; padding: 4px 7px; text-align: right; font-weight: 800; }
.finished-warranty-policy-table td span { color: #677386; font-size: 10px; }
.finished-warranty-policy-card > .finished-shipment-message { margin: 10px 20px 0; }
.finished-shipment-replacement-card { width: min(520px, calc(100vw - 32px)); padding: 0; overflow: hidden; }
.finished-shipment-replacement-field { display: block; margin: 18px 20px 0; }
.finished-shipment-replacement-field span { display: block; margin-bottom: 5px; color: #4f5d70; font-size: 11px; font-weight: 800; }
.finished-shipment-replacement-field input { width: 100%; min-height: 42px; border: 1px solid #b8c8da; border-radius: 6px; padding: 8px 10px; font: 700 14px Consolas, "SFMono-Regular", monospace; text-transform: uppercase; }
.finished-shipment-replacement-note { margin: 10px 20px 0; border-left: 3px solid #c58d1e; padding: 7px 9px; background: #fff8e8; color: #6e5018; font-size: 10px; line-height: 1.55; }
.finished-shipment-replacement-card > .finished-shipment-message { margin: 10px 20px 0; }
@media (max-width: 767px) {
  #screen-production-search.active { height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; overflow: hidden; }
  #screen-production-search .production-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; align-content: start; }
  .production-body { grid-template-columns: 1fr; }
  .production-left { border-right: 0; max-height: none; }
  .production-list { max-height: 38vh; min-height: 120px; }
  .production-right { overflow: visible; }
  .production-detail { display: block; overflow: visible; padding: 12px 10px 24px; scroll-margin-top: 8px; }
  .production-detail-head { flex-direction: column; }
  .production-detail-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
  .production-actions { justify-content: flex-start; }
  .production-image-panel { max-width: 100%; width: 100%; }
  .production-image-groups { grid-template-columns: 1fr; gap: 7px; }
  .production-stamp-search-head { padding: 15px 14px 12px; }
  .production-stamp-search-fields { grid-template-columns: 1fr; padding: 14px 14px 4px; }
  .production-stamp-search-error { margin-right: 14px; margin-left: 14px; }
  .production-stamp-search-card .form-footer { padding-right: 14px; padding-left: 14px; }
  .production-stamp-pair-grid { grid-template-columns: 1fr; max-height: 157px; }
  .production-workspace { display: grid; grid-template-columns: 1fr; overflow: visible; }
  .production-master-column, .production-operations-column { display: flex; flex-direction: column; overflow: visible; }
  .production-master-section, .production-component-summary-section, .production-kikan-section, .production-core-section, #production-kikan-wrap { overflow: visible; }
  .production-component-summary-wrap { max-height: 320px; overflow: auto; }
  .production-component-summary-table { min-width: 0; }
  .core-qty-summary { grid-template-columns: 1fr; }
  .core-qty-card + .core-qty-card { border-top: 1px solid #dbe3ec; border-left-width: 3px; }
  .production-core-meta { grid-template-columns: 1fr; }
  .production-core-meta .production-kv + .production-kv { border-top: 1px solid #edf0f4; border-left: 0; }
  .production-ranking-tools { grid-template-columns: 1fr 1fr; }
  .production-ranking-tools .form-select { grid-column: 1 / -1; }
  .finished-label-body { overflow: auto; padding: 12px; }
  .finished-label-mode-hub { margin: 0; padding: 18px; }
  .finished-label-mode-grid { grid-template-columns: 1fr; }
  .finished-label-mode-card { min-height: 170px; }
  .finished-label-workspace { height: auto; }
  .finished-label-mode-bar { align-items: flex-start; flex-direction: column; }
  .finished-label-shell { grid-template-columns: 1fr; height: auto; }
  .finished-label-form-grid { grid-template-columns: 1fr; }
  .finished-label-form-grid .wide { grid-column: 1 / -1; }
  .finished-label-component-picker { grid-template-columns: 1fr; }
  .finished-label-actions { position: static; flex-wrap: wrap; }
  .finished-label-layout-head, .finished-label-layout-foot { align-items: flex-start; flex-direction: column; }
  .finished-label-layout-badges { justify-content: flex-start; }
  .finished-shipment-body { overflow: auto; padding: 12px; }
  .finished-shipment-shell { grid-template-columns: 1fr; height: auto; }
  .finished-shipment-left, .finished-shipment-right { overflow: visible; }
  .finished-shipment-scan-row { grid-template-columns: 1fr 1fr; }
  .finished-shipment-scan-row input { grid-column: 1 / -1; }
  .finished-shipment-scan-row button { width: 100%; min-height: 42px; }
  .finished-shipment-camera-card { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .finished-shipment-camera-stage { margin: 10px 10px 0; aspect-ratio: 3 / 4; }
  .finished-shipment-camera-status { margin-right: 10px; margin-left: 10px; }
  .finished-shipment-lookup-grid { grid-template-columns: 1fr; }
  .finished-shipment-order-grid { grid-template-columns: 1fr; }
  .finished-shipment-order-item { grid-template-columns: minmax(0, 1fr) auto; }
  .finished-shipment-order-item > b { grid-column: 2; }
  .finished-shipment-order-item button { grid-column: 1 / -1; width: 100%; }
  .finished-shipment-item-warranty, .finished-shipment-replacement-actions { grid-column: 1 / -1; }
  .finished-shipment-item-warranty { align-items: flex-start; flex-direction: column; }
  .finished-shipment-item-warranty em { margin-left: 0; }
  .finished-shipment-replacement-actions { flex-direction: column; }
  .finished-warranty-policy-table-wrap { padding-right: 10px; padding-left: 10px; }
  .finished-warranty-policy-table thead th:first-child { width: 42%; }
  .finished-warranty-policy-table th, .finished-warranty-policy-table td { padding: 6px 5px; }
  .finished-warranty-policy-table td label { align-items: stretch; flex-direction: column; }
  .finished-warranty-policy-table td input { width: 100%; }
  .finished-shipment-candidate { align-items: stretch; flex-direction: column; }
  .finished-shipment-candidate button { width: 100%; }
  .finished-shipment-submit-row { align-items: stretch; flex-direction: column; }
  .finished-shipment-picking-stock { grid-template-columns: 1fr; }
  .finished-shipment-picking-stock > div + div { border-top: 1px solid #e2e7ed; border-left: 0; }
  #screen-finished-product-shipping.mobile-shipment-action-active .finished-shipment-body { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
  .finished-shipment-mobile-final-action:not([hidden]) { position: fixed; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); left: 10px; z-index: 80; display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 46%); align-items: center; gap: 8px 10px; border: 1px solid #b9c8d7; border-radius: 8px; padding: 9px; background: #fff; box-shadow: 0 8px 24px rgba(22, 36, 54, .2); }
  .finished-shipment-mobile-readiness { display: grid; gap: 2px; min-width: 0; border-left: 4px solid #bf7b12; padding-left: 9px; }
  .finished-shipment-mobile-readiness span { color: #6b7582; font-size: 10px; font-weight: 700; }
  .finished-shipment-mobile-readiness strong { overflow: hidden; color: #725016; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .finished-shipment-mobile-readiness.ready { border-left-color: #2b7a4b; }
  .finished-shipment-mobile-readiness.ready strong { color: #176238; }
  .finished-shipment-mobile-readiness.error { border-left-color: #c62828; }
  .finished-shipment-mobile-readiness.error strong { color: #9b2424; }
  .finished-shipment-mobile-final-action .btn-primary { width: 100%; min-height: 48px; padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .finished-shipment-mobile-final-action .btn-primary:disabled { border-color: #c6cdd5; background: #e6e9ed; color: #7f8995; cursor: not-allowed; opacity: 1; }
  .finished-shipment-mobile-final-action .finished-shipment-message { grid-column: 1 / -1; max-height: 78px; margin-top: 0; overflow: auto; font-size: 10px; }
}

/* =============================================
   フルスクリーンギャラリー
============================================= */
.fullscreen { display: none; position: fixed; inset: 0; background: #000; z-index: 999; flex-direction: column; }
.fullscreen.show { display: flex; }
.fs-top     { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; flex-shrink: 0; }
.fs-counter { color: #ccc; font-size: 14px; }
.fs-close   { color: #fff; font-size: 24px; cursor: pointer; background: none; border: none; padding: 4px 8px; }
.fs-main    { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.fs-img     { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.fs-nav     { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.18); border: none; color: #fff; font-size: 28px; width: 44px; height: 60px; cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.fs-nav:active { background: rgba(255,255,255,0.35); }
.fs-prev { left: 8px; }
.fs-next { right: 8px; }
.fs-nav.hidden { display: none; }
.fs-thumbs  { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; flex-shrink: 0; }
.fs-thumb   { width: 52px; height: 52px; border-radius: 6px; overflow: hidden; flex-shrink: 0; cursor: pointer; opacity: 0.5; border: 2px solid transparent; background: #fff; display: flex; align-items: center; justify-content: center; }
.fs-thumb.active { opacity: 1; border-color: #4f8ef7; }
.fs-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; image-rendering: auto; }

/* =============================================
   ユーザー管理画面
============================================= */
.users-body { flex: 1; padding: 20px 16px; max-width: 1280px; width: 100%; margin: 0 auto; overflow-y: auto; }
.users-body h2 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.users-desc { font-size: 13px; color: #888; margin-bottom: 20px; line-height: 1.6; }
.internal-user-issuance { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; padding: 13px 14px; border: 1px solid #cfe0d8; border-radius: 8px; background: #f4faf7; }
.internal-user-issuance h3 { margin: 0 0 3px; color: #1f2937; font-size: 14px; font-weight: 800; }
.internal-user-issuance p { margin: 0; color: #667085; font-size: 11px; line-height: 1.5; }
.internal-user-invite-open { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 150px; min-height: 36px; white-space: nowrap; }
.internal-user-invite-open > span:first-child { font-size: 17px; line-height: 1; }
.internal-user-invite-modal { width: min(760px, calc(100vw - 24px)); max-width: 760px; }
.internal-user-invite-summary { margin: -6px 0 14px; color: #667085; font-size: 12px; line-height: 1.5; }
.internal-user-invite-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; padding: 14px; border: 1px solid #dfe5ec; border-radius: 8px; background: #f8fafc; }
.internal-user-invite-grid input,
.internal-user-invite-grid select { width: 100%; min-height: 36px; box-sizing: border-box; }
.internal-user-invite-role-field { grid-column: 1 / -1; }
.internal-user-invite-result { min-height: 20px; margin-top: 10px; font-size: 12px; line-height: 1.5; }
.internal-user-invite-footer { align-items: center; justify-content: flex-end; }
.internal-user-invite-footer .btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 190px; }
.internal-user-invite-footer .btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.customer-account-issuance { margin: 12px 0 18px; border: 1px solid #d8e2df; border-radius: 8px; background: #fff; }
.customer-account-issuance-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid #e5ebe8; background: #f7faf8; }
.customer-account-issuance-head h3 { margin: 0 0 3px; color: #1f2937; font-size: 14px; font-weight: 800; }
.customer-account-issuance-head p { margin: 0; color: #667085; font-size: 11px; line-height: 1.45; }
.customer-account-issuance-fields { display: grid; grid-template-columns: minmax(250px, 1.35fr) minmax(160px, .7fr) minmax(240px, 1fr) minmax(150px, .6fr); gap: 12px; padding: 14px; }
.customer-account-issuance-fields input,
.customer-account-issuance-fields select { width: 100%; min-height: 34px; box-sizing: border-box; }
.customer-account-issuance-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 54px; padding: 10px 14px; border-top: 1px solid #edf1ef; }
.customer-account-issuance-actions .save-msg { margin-right: auto; line-height: 1.4; }
.customer-account-preview-button { min-height: 36px; border: 1px solid #b9d3ff; border-radius: 6px; padding: 7px 12px; background: #eef4ff; color: #175cd3; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.customer-account-preview-button:hover { background: #dbeafe; }
.customer-account-fax-button { min-height: 36px; border: 1px solid #98a2b3; border-radius: 6px; padding: 7px 13px; background: #fff; color: #344054; font-size: 12px; font-weight: 800; cursor: pointer; }
.customer-account-fax-button:hover { background: #f2f4f7; }
.customer-account-fax-button:disabled,
.customer-account-preview-button:disabled,
.customer-account-issuance-actions .btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.customer-access-panel .customer-account-issuance { margin: 0; border: 0; border-bottom: 1px solid #dfe5ec; border-radius: 0; }
.customer-access-panel .customer-account-issuance-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-access-panel .customer-account-customer-field { grid-column: 1 / -1; }
.customer-account-selected { min-height: 34px; padding: 7px 9px; border: 1px solid #d8dee8; border-radius: 6px; background: #f8fafc; color: #1f2937; font-size: 12px; font-weight: 800; box-sizing: border-box; }
.customer-account-existing { border-top: 1px solid #edf1ef; }
.customer-account-existing-head { padding: 9px 14px; color: #475467; background: #f8fafc; font-size: 11px; font-weight: 800; }
.customer-account-list { min-height: 48px; }
.customer-account-user-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 8px 12px; align-items: center; padding: 10px 14px; border-top: 1px solid #edf1ef; }
.customer-account-user-row:first-child { border-top: 0; }
.customer-account-user-identity { min-width: 0; }
.customer-account-user-identity strong { display: block; color: #1f2937; font-size: 12px; line-height: 1.4; }
.customer-account-user-identity span { display: block; margin-top: 2px; color: #667085; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.customer-account-user-status { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.customer-account-user-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.customer-account-user-actions button { min-height: 30px; }
.customer-account-user-message { grid-column: 1 / -1; min-height: 0; }
.customer-account-edit-modal { width: min(640px, calc(100vw - 24px)); max-width: 640px; }
.customer-account-edit-summary { margin: -7px 0 14px; color: #667085; font-size: 12px; line-height: 1.45; }
.customer-account-edit-grid { display: grid; gap: 13px; padding: 14px; border: 1px solid #e5e7eb; border-radius: 8px; background: #f8fafc; }
.customer-account-edit-footer { align-items: center; }
.customer-account-edit-footer .save-msg { margin-right: auto; }
.customer-account-email-preview-modal { width: min(700px, calc(100vw - 24px)); max-width: 700px; }
.customer-account-email-preview-note { margin: -5px 0 14px; padding: 10px 12px; border: 1px solid #f2d38b; border-radius: 8px; background: #fff9e8; color: #6b5216; font-size: 12px; line-height: 1.55; }
.customer-account-email-preview-meta { display: grid; grid-template-columns: 110px minmax(0, 1fr); margin: 0; border: 1px solid #dfe5ec; border-radius: 8px; overflow: hidden; font-size: 12px; }
.customer-account-email-preview-meta dt,
.customer-account-email-preview-meta dd { margin: 0; padding: 9px 11px; border-bottom: 1px solid #edf1ef; }
.customer-account-email-preview-meta dt { color: #475467; background: #f8fafc; font-weight: 800; }
.customer-account-email-preview-meta dd { color: #1f2937; overflow-wrap: anywhere; }
.customer-account-email-preview-meta dt:nth-last-of-type(1),
.customer-account-email-preview-meta dd:last-of-type { border-bottom: 0; }
.customer-account-email-preview-body { margin-top: 12px; padding: 13px 14px; border: 1px solid #dbe7ff; border-radius: 8px; background: #f7faff; color: #344054; font-size: 12px; line-height: 1.6; }
.customer-account-email-preview-body strong { color: #1f2937; }
.customer-account-email-preview-body ul { margin: 8px 0 8px 20px; padding: 0; }
.customer-account-email-preview-body p { margin: 8px 0 0; color: #667085; }
.customer-account-email-preview-body p:first-child { margin-top: 0; color: #1f2937; }
.customer-account-email-preview-action { width: fit-content; margin: 14px auto; padding: 10px 18px; border-radius: 7px; background: #2563eb; color: #fff; font-weight: 800; text-align: center; }
.customer-account-email-preview-body .customer-account-email-preview-small { font-size: 11px; color: #667085; }
.customer-account-email-preview-admin { margin-top: 11px; text-align: right; font-size: 12px; }
.customer-account-email-preview-admin a { color: #175cd3; font-weight: 800; text-decoration: none; }
.customer-account-email-preview-admin a:hover { text-decoration: underline; }
.user-permission-overview { margin: 12px 0 16px; }
.user-permission-overview-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.user-permission-overview-head h3 { margin: 0 0 2px; color: #1f2937; font-size: 14px; font-weight: 800; }
.user-permission-overview-head p { margin: 0; color: #667085; font-size: 12px; line-height: 1.45; }
.user-permission-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.user-permission-toolbar .mgmt-search { width: min(440px, 100%); }
.user-permission-toolbar-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.user-suspended-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; font-size: 12px; color: #344054; cursor: pointer; }
.user-suspended-filter input { margin: 0; }
.user-permission-toolbar .mgmt-count { margin: 0; white-space: nowrap; }
.permission-table-wrap { overflow-x: auto; margin: 12px 0 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; }
.user-permission-overview .permission-table-wrap { overflow: visible; margin: 0; background: transparent; border: 0; border-radius: 0; }
.permission-ok { color: #157f3b; font-weight: 700; }
.permission-no { color: #aaa; }
.permission-role-counts { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.permission-role-count { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border: 1px solid transparent; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1; white-space: nowrap; }
.permission-role-count.allowed { color: #157f3b; background: #edf9f1; border-color: #c9ead4; }
.permission-role-count.limited { color: #175cd3; background: #eff6ff; border-color: #c7dcff; }
.permission-role-count.optional { color: #9a6700; background: #fff8e6; border-color: #f3d58b; }
.permission-role-count.denied { color: #667085; background: #f2f4f7; border-color: #e4e7ec; }
.permission-screen-table-wrap { overflow-x: auto; background: #fff; }
.permission-screen-table { width: 100%; min-width: 680px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.permission-screen-table thead th { padding: 8px 10px; color: #475467; background: #f8fafc; border-bottom: 1px solid #dfe5ec; font-size: 11px; font-weight: 800; text-align: left; }
.permission-screen-table thead th:first-child { width: 21%; }
.permission-screen-table thead th:nth-child(2) { width: 31%; }
.permission-screen-table thead th:nth-child(3) { width: 16%; }
.permission-screen-table thead th:nth-child(4) { width: 32%; }
.permission-screen-table tbody th,
.permission-screen-table tbody td { padding: 7px 10px; border-bottom: 1px solid #edf0f3; text-align: left; vertical-align: middle; }
.permission-screen-table tbody tr:last-child th,
.permission-screen-table tbody tr:last-child td { border-bottom: 0; }
.permission-screen-group-row th { padding: 7px 10px !important; color: #344054; background: #eef2f6; border-top: 1px solid #dfe5ec; border-bottom-color: #dfe5ec !important; font-size: 11px; font-weight: 800; }
.permission-screen-group-row:first-child th { border-top: 0; }
.permission-screen-name { color: #1f2937; background: #fbfcfe; border-right: 1px solid #edf0f3; font-weight: 800; }
.permission-screen-item { color: #475467; }
.permission-screen-visibility { color: #344054; }
.permission-screen-state { color: #344054; }
.permission-visibility { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border: 1px solid transparent; border-radius: 6px; font-size: 10px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.permission-visibility-visible { color: #157f3b; background: #edf9f1; border-color: #c9ead4; }
.permission-visibility-conditional { color: #9a6700; background: #fff8e6; border-color: #f3d58b; }
.permission-visibility-hidden { color: #667085; background: #f2f4f7; border-color: #e4e7ec; }
.permission-status { display: inline-flex; align-items: center; min-height: 24px; max-width: 100%; padding: 3px 8px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; font-weight: 800; line-height: 1.3; white-space: normal; }
.permission-status-allowed { color: #157f3b; background: #edf9f1; border-color: #c9ead4; }
.permission-status-limited { color: #175cd3; background: #eff6ff; border-color: #c7dcff; }
.permission-status-optional { color: #9a6700; background: #fff8e6; border-color: #f3d58b; }
.permission-status-denied { color: #667085; background: #f2f4f7; border-color: #e4e7ec; }
.user-permission-management-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #dfe5ec; border-radius: 8px; }
.user-permission-management-table { width: 100%; min-width: 900px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.user-permission-management-table th { padding: 8px 10px; color: #475467; background: #f5f7fa; border-bottom: 1px solid #dfe5ec; font-size: 11px; font-weight: 800; text-align: left; }
.user-permission-management-table th:first-child { width: 28%; }
.user-permission-management-table th:nth-child(2) { width: 18%; }
.user-permission-management-table th:nth-child(3) { width: 27%; }
.user-permission-management-table th:nth-child(4) { width: 15%; }
.user-permission-management-table th:last-child { width: 12%; }
.user-permission-management-table td { padding: 9px 10px; color: #344054; border-bottom: 1px solid #edf0f3; vertical-align: middle; }
.user-permission-management-table tr:last-child td { border-bottom: 0; }
.user-permission-person { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.user-permission-person strong { min-width: 0; color: #1f2937; font-size: 12px; overflow-wrap: anywhere; }
.btn-user-permission-open { min-height: 30px; border: 1px solid #b9d3ff; border-radius: 6px; background: #eef4ff; color: #175cd3; padding: 5px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.btn-user-permission-open:hover { background: #dbeafe; }
.user-permission-edit-modal { width: min(1120px, calc(100vw - 24px)); max-width: 1120px; padding: 20px; }
.user-permission-edit-summary { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin: -8px 0 14px; color: #667085; font-size: 11px; }
.user-permission-edit-summary strong { color: #1f2937; font-size: 13px; }
.user-permission-edit-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; }
.user-permission-edit-controls.has-customer-field { grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr); }
.user-permission-edit-controls select { width: 100%; min-height: 34px; box-sizing: border-box; }
.user-permission-edit-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 8px; }
.user-permission-edit-preview-head strong { color: #344054; font-size: 12px; }
.user-permission-edit-guide { display: block; margin-top: 3px; color: #667085; font-size: 11px; line-height: 1.4; }
.user-permission-edit-preview { max-height: 45vh; overflow: auto; border: 1px solid #dfe5ec; border-radius: 8px; }
.user-permission-edit-preview .permission-screen-table thead th { position: sticky; top: 0; z-index: 2; }
.user-permission-edit-footer { position: sticky; bottom: -20px; align-items: center; background: #fff; padding-bottom: 4px; }
.user-permission-edit-footer .save-msg { margin-right: auto; }
.permission-state-editor { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; }
.permission-state-toggle { appearance: none; cursor: pointer; font-family: inherit; text-align: left; }
.permission-state-toggle:hover { filter: brightness(0.97); box-shadow: 0 0 0 2px rgba(79, 142, 247, 0.14); }
.permission-state-toggle:focus-visible { outline: 2px solid #4f8ef7; outline-offset: 2px; }
.permission-state-reset { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: 0 0 26px; padding: 0; color: #475467; background: #fff; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 15px; line-height: 1; cursor: pointer; }
.permission-state-reset:hover { color: #175cd3; background: #eff6ff; border-color: #b9d3ff; }
.permission-override-count { color: #175cd3; font-weight: 800; }
.users-list-section { margin-top: 18px; }
.users-list-section-head { margin: 0 0 8px; }
.users-list-section-head h3 { margin: 0; color: #1f2937; font-size: 14px; font-weight: 800; }
.user-card     { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.user-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.user-card-identity { display: flex; align-items: flex-start; gap: 10px; min-width: 0; flex: 1; }
.user-avatar   { width: 38px; height: 38px; border-radius: 50%; background: #4f8ef7; color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.user-email    { font-size: 13px; font-weight: 600; color: #333; word-break: break-all; }
.user-summary-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: #667085; }
.user-summary-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 22px; padding: 2px 7px; border-radius: 999px; background: #f3f6fb; color: #475467; border: 1px solid #e5eaf2; }
.user-summary-chip.role { background: #eef4ff; color: #1d4ed8; border-color: #bfdbfe; font-weight: 700; }
.user-created  { font-size: 11px; color: #aaa; margin-top: 2px; }
.user-auth-state-note { margin-top: 3px; color: #667085; font-size: 11px; line-height: 1.35; }
.user-settings-grid { display: grid; grid-template-columns: minmax(200px, 0.8fr) minmax(300px, 1fr) minmax(360px, 1.45fr) minmax(210px, 0.85fr); gap: 12px; align-items: start; border-top: 1px solid #eef1f5; padding-top: 12px; }
.user-settings-grid.account-only { grid-template-columns: minmax(200px, 0.8fr) minmax(220px, 0.9fr) minmax(280px, 1.2fr); }
.user-settings-section { min-width: 0; }
.user-settings-section-title { font-size: 11px; color: #344054; font-weight: 700; margin-bottom: 8px; }
.user-settings-section-fields { display: grid; gap: 10px; }
.user-settings-section-fields.two-col { grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr); }
.user-field { min-width: 0; }
.user-field-label { display: block; font-size: 12px; color: #667085; font-weight: 700; margin-bottom: 5px; }
.user-field-note { min-height: 18px; margin-top: 5px; font-size: 11px; color: #667085; line-height: 1.35; }
.user-check-field { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 9px; border: 1px solid #d7dce5; border-radius: 7px; background: #fff; font-size: 12px; color: #1f2937; font-weight: 700; cursor: pointer; }
.user-check-field input { width: 16px; height: 16px; flex: 0 0 auto; }
.user-check-field.disabled { background: #f7f8fb; color: #8a94a6; cursor: not-allowed; }
.user-name-input { width: 100%; min-height: 32px; box-sizing: border-box; border: 1px solid #ddd; border-radius: 6px; padding: 6px 10px; font-size: 13px; outline: none; }
.user-name-input:focus { border-color: #4f8ef7; }
.user-card-bottom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; min-width: 250px; }
.user-actions-label { width: 100%; text-align: right; font-size: 11px; color: #98a2b3; font-weight: 700; }
.role-select   { min-height: 32px; box-sizing: border-box; border: 1px solid #ddd; border-radius: 6px; padding: 6px 10px; font-size: 13px; outline: none; cursor: pointer; width: 100%; background: #fff; }
.group-select  { width: 100%; min-height: 32px; box-sizing: border-box; }
.btn-save-user { background: #4f8ef7; color: #fff; border: none; border-radius: 6px; padding: 7px 16px; font-size: 13px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn-save-user:hover { background: #3a7ae0; }
.btn-user-history { background: #eef4ff; color: #2563eb; border: 1px solid #bfdbfe; border-radius: 6px; padding: 7px 12px; font-size: 12px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn-user-history:hover { background: #dbeafe; }
.btn-pw-reset { background: #667085; color: #fff; border: none; border-radius: 6px; padding: 7px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.btn-pw-reset:hover { background: #525b6b; }
.user-auth-history-modal { max-width: 980px; }
.user-auth-history-summary { font-size: 12px; color: #667085; margin: -6px 0 12px; }
.user-auth-history-list { max-height: 56vh; overflow: auto; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.customer-activity-overview { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 8px; padding: 12px; border-bottom: 1px solid #dfe5ec; background: #f7faf8; }
.customer-activity-stat { min-width: 0; padding: 9px 10px; border: 1px solid #dbe6df; border-radius: 6px; background: #fff; }
.customer-activity-stat span { display: block; margin-bottom: 3px; color: #667085; font-size: 11px; font-weight: 700; }
.customer-activity-stat strong { display: block; color: #163d31; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.user-auth-history-list .log-table th { position: sticky; top: 0; z-index: 1; }
.user-history-section { padding: 10px 12px 14px; border-bottom: 1px solid #edf0f4; }
.user-history-section:last-child { border-bottom: 0; }
.user-history-section-title { font-size: 12px; font-weight: 800; color: #344054; margin: 2px 0 8px; }
.activity-event-badge { display:inline-block; border-radius:999px; background:#eef4ff; color:#2563eb; padding:2px 8px; font-size:11px; font-weight:700; white-space:nowrap; }
.auth-history-ip { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; color: #475467; }
.auth-event-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700; }
.auth-event-login { background: #e8f7ee; color: #16723a; }
.auth-event-logout { background: #f3f4f6; color: #475467; }
.customer-search-history-query { color: #1d2939; font-size: 13px; }
.customer-search-history-result { display: inline-flex; min-width: 54px; justify-content: center; padding: 2px 7px; border: 1px solid #b9dac9; border-radius: 6px; background: #edf8f2; color: #17633f; font-weight: 800; white-space: nowrap; }
.save-msg { font-size: 12px; }
.save-ok  { color: #1a8c3e; }
.save-err { color: #e24b4a; }
@media (max-width: 900px) {
  .customer-account-issuance-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-account-customer-field { grid-column: 1 / -1; }
  .user-permission-edit-controls.has-customer-field { grid-template-columns: 1fr; }
  .user-card-top { flex-direction: column; }
  .user-actions { justify-content: flex-start; width: 100%; min-width: 0; }
  .user-actions-label { text-align: left; }
  .user-settings-grid { grid-template-columns: 1fr; }
  .user-settings-grid.account-only { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .internal-user-issuance { align-items: stretch; flex-direction: column; }
  .internal-user-invite-open { width: 100%; }
  .internal-user-invite-modal { width: calc(100vw - 12px); margin: 6px; padding: 14px; }
  .internal-user-invite-grid { grid-template-columns: 1fr; padding: 12px; }
  .internal-user-invite-role-field { grid-column: auto; }
  .internal-user-invite-footer { align-items: stretch; flex-direction: column-reverse; }
  .internal-user-invite-footer button { width: 100%; }
  .customer-account-issuance-head { align-items: flex-start; flex-direction: column; }
  .customer-account-issuance-fields { grid-template-columns: 1fr; }
  .customer-access-panel .customer-account-issuance-fields { grid-template-columns: 1fr; }
  .customer-account-customer-field { grid-column: auto; }
  .customer-access-panel .customer-account-customer-field { grid-column: auto; }
  .customer-account-issuance-actions { align-items: stretch; flex-direction: column; }
  .customer-account-issuance-actions .save-msg { width: 100%; margin: 0; }
  .customer-account-issuance-actions button { width: 100%; }
  .customer-account-user-row { grid-template-columns: 1fr; align-items: stretch; }
  .customer-account-user-actions { justify-content: flex-start; }
  .customer-account-user-status { white-space: normal; }
  .user-auth-history-modal { width: calc(100vw - 12px); margin: 6px; padding: 14px; }
  .customer-activity-overview { grid-template-columns: 1fr; }
  .user-auth-history-list .log-table { min-width: 620px; }
  .user-permission-overview-head { align-items: flex-start; flex-direction: column; }
  .user-permission-toolbar { align-items: stretch; flex-direction: column; gap: 4px; }
  .user-permission-toolbar .mgmt-search { width: 100%; }
  .user-permission-toolbar .mgmt-count { text-align: left; }
  .user-permission-management-table-wrap { overflow: visible; border: 0; background: transparent; }
  .user-permission-management-table { display: block; min-width: 0; background: transparent; }
  .user-permission-management-table thead { display: none; }
  .user-permission-management-table tbody { display: grid; gap: 8px; }
  .user-permission-management-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; border: 1px solid #dfe5ec; border-radius: 8px; background: #fff; }
  .user-permission-management-table td { display: block; min-width: 0; padding: 8px 10px; border-bottom: 0 !important; }
  .user-permission-management-table td:first-child { grid-column: 1 / -1; padding-top: 10px; border-bottom: 1px solid #edf0f3 !important; }
  .user-permission-management-table td:nth-child(n + 2)::before { display: block; margin-bottom: 3px; color: #98a2b3; font-size: 10px; font-weight: 800; }
  .user-permission-management-table td:nth-child(2)::before { content: "会社"; }
  .user-permission-management-table td:nth-child(3)::before { content: "基準権限"; }
  .user-permission-management-table td:nth-child(4)::before { content: "製造原価"; }
  .user-permission-management-table td:nth-child(5)::before { content: "操作"; }
  .user-permission-management-table .btn-user-permission-open { width: 100%; }
  .user-permission-edit-modal { width: calc(100vw - 12px); margin: 6px; padding: 14px; }
  .user-permission-edit-preview-head { align-items: flex-start; flex-direction: column; }
  .user-permission-edit-footer { bottom: -14px; flex-wrap: wrap; }
  .user-permission-edit-footer .save-msg { width: 100%; }
  .permission-role-counts { justify-content: flex-start; }
  .permission-screen-table { min-width: 0; font-size: 11px; }
  .permission-screen-table thead th:first-child { width: 23%; }
  .permission-screen-table thead th:nth-child(2) { width: 28%; }
  .permission-screen-table thead th:nth-child(3) { width: 20%; }
  .permission-screen-table thead th:nth-child(4) { width: 29%; }
  .permission-screen-table thead th,
  .permission-screen-table tbody th,
  .permission-screen-table tbody td { padding: 6px; overflow-wrap: anywhere; }
  .permission-status { padding: 3px 6px; font-size: 10px; }
  .user-settings-grid { grid-template-columns: 1fr; }
  .user-settings-section-fields.two-col { grid-template-columns: 1fr; }
}

/* =============================================
   PC レスポンシブ（768px以上）
============================================= */
@media (min-width: 768px) {
  #screen-search.active { height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; overflow: hidden; }
  #screen-search .app-body { display: flex; flex-direction: row; flex: 1; min-height: 0; overflow: hidden; }
  #screen-search .left-col { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; height: 100%; min-height: 0; border-right: 1px solid #e0e0e0; background: #f0f2f5; overflow: hidden; }
  #screen-search .right-col { flex: 1; display: flex; flex-direction: column; height: 100%; min-width: 0; min-height: 0; background: #fff; overflow: hidden; }
  #screen-search .overlay { display: none !important; }
  #screen-search .panel { position: static; height: 100%; min-height: 0; max-height: none; border-radius: 0; transform: none !important; transition: none; display: flex; }
  #screen-search .panel-close-btn { display: none; }
  #screen-production-search.active { height: 100vh; overflow: hidden; }
  #screen-production-search .production-body { flex: 1; height: 100%; min-height: 0; overflow: hidden; }
  #screen-production-search .production-left,
  #screen-production-search .production-right { height: 100%; min-height: 0; }
  #screen-production-search .production-detail { max-width: none; min-height: 0; padding: 8px 10px 10px; }
  #screen-production-search .production-image-panel { margin: 0; }
  #screen-production-search .production-section { padding: 10px; }
  #screen-production-search .production-section > h3 { margin-bottom: 6px; }
  #screen-production-search .detail-main-grid { gap: 10px; padding-bottom: 6px; margin-bottom: 4px; }
  #screen-production-search .detail-vehicle-grid:not(.detail-spec-grid) { grid-template-columns: 96px minmax(0, 1fr); }
  #screen-production-search .detail-vehicle-grid.detail-vehicle-maker-grid { grid-template-columns: 72px minmax(0, 1fr); }
  #screen-production-search .ac-part-row { grid-template-columns: 136px minmax(0, 1fr); }
  #screen-production-search .detail-vehicle-label,
  #screen-production-search .detail-vehicle-value,
  #screen-production-search .ac-part-label,
  #screen-production-search .ac-part-value { min-height: 30px; padding: 5px 4px; }
  #screen-production-search .detail-vehicle-label,
  #screen-production-search .ac-part-label { font-size: 12px; white-space: nowrap; }
  #screen-production-search .detail-vehicle-maker-label { line-height: 1.25; white-space: normal; overflow-wrap: normal; }
  #screen-production-search .detail-vehicle-maker-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  #screen-production-search .detail-vehicle-maker-row .catalog-vehicle-maker-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #screen-production-search .detail-vehicle-maker-row .catalog-vehicle-button { min-width: 0; max-width: 100%; padding: 2px 6px; white-space: nowrap; }
  #screen-production-search .detail-spec-after-maker { margin-top: 6px; }
  #screen-production-search .detail-spec-grid { grid-template-columns: 86px minmax(0, 1fr) 86px minmax(0, 1fr); }
  #screen-production-search .detail-spec-grid .detail-vehicle-label { padding-right: 2px; padding-left: 2px; font-size: 11px; white-space: nowrap; }
  #screen-production-search .detail-spec-grid .detail-vehicle-value { padding-right: 2px; padding-left: 2px; font-size: 12px; white-space: nowrap; }
  #screen-production-search .production-core-section .core-qty-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
  #screen-production-search .production-core-section .core-qty-card { padding: 6px 8px; }
  #screen-production-search .production-core-section .core-qty-label { margin-bottom: 2px; }
  #screen-production-search .production-core-section .core-qty-value { font-size: 18px; }
  #screen-production-search .production-core-section .core-qty-sub { margin-top: 2px; }
  #screen-production-search .production-kv div { padding: 4px; }
  #screen-production-search .production-core-policy-list { margin-top: 4px; }
  #screen-production-search .production-core-policy-row { grid-template-columns: 70px minmax(0, 1fr); padding: 3px 0; }
  #screen-production-search .production-core-policy-kind { padding-top: 3px; }
  #screen-production-search .production-core-policy-row .core-return-policy-panel.vertical .core-return-policy-item { grid-template-columns: 64px minmax(80px, 1fr); min-height: 24px; }
  #screen-production-search .production-core-policy-row .core-return-policy-item span,
  #screen-production-search .production-core-policy-row .core-return-policy-item strong,
  #screen-production-search .production-core-policy-row .core-return-badge { white-space: nowrap; overflow-wrap: normal; }
}

@media (min-width: 768px) and (max-width: 1180px) {
  #screen-production-search .production-right { overflow-y: auto; }
  #screen-production-search .production-detail { display: block; overflow: visible; }
  #screen-production-search .production-workspace { grid-template-columns: 1fr; overflow: visible; }
  #screen-production-search .production-master-column,
  #screen-production-search .production-operations-column { display: flex; flex-direction: column; overflow: visible; }
  #screen-production-search .production-master-section,
  #screen-production-search .production-component-summary-section,
  #screen-production-search .production-kikan-section,
  #screen-production-search .production-core-section,
  #screen-production-search #production-kikan-wrap { overflow: visible; }
}

/* CSP-safe replacements for former inline styles. */
[data-dcats-inline-style="s-00d4a404654a"] { padding:5px 4px;color:#555;font-family:monospace }
[data-dcats-inline-style="s-0560f09b7472"] { padding:5px 4px;font-family:monospace;color:#1a6fd4 }
[data-dcats-inline-style="s-071ceaf52519"] { display:flex;align-items:center;justify-content:space-between;margin-bottom:8px }
[data-dcats-inline-style="s-087d6e2d74b9"] { display:none;margin-top:auto;padding-top:8px;border-top:1px solid #eee }
[data-dcats-inline-style="s-09e62ff5dda9"] { padding:5px 4px }
[data-dcats-inline-style="s-0d248ae75a53"] { margin-bottom:4px }
[data-dcats-inline-style="s-0ee7f66ad9c0"] { margin-top:12px }
[data-dcats-inline-style="s-1024138906a0"] { color:#1a8c3e }
[data-dcats-inline-style="s-19f890a2e2b5"] { text-align:center;margin-top:14px;padding-top:14px;border-top:1px solid #f0f0f0;display:flex;flex-direction:column;gap:8px }
[data-dcats-inline-style="s-1c23a9165fd3"] { max-width:980px }
[data-dcats-inline-style="s-1c3824df6728"] { min-width:0;flex:1 }
[data-dcats-inline-style="s-1ca2107b5af1"] { height:18px }
[data-dcats-inline-style="s-286372957b99"] { flex:1;min-width:0 }
[data-dcats-inline-style="s-2f84ce92669f"] { display:flex;justify-content:flex-end;margin-top:8px }
[data-dcats-inline-style="s-301647f5065e"] { margin-top:6px }
[data-dcats-inline-style="s-3822ea0f6a98"] { font-size:11px;color:#aaa;margin-top:6px }
[data-dcats-inline-style="s-3ed932770a8e"] { font-weight:400;color:#aaa;font-size:11px }
[data-dcats-inline-style="s-43a97fe4943c"] { margin-top:8px }
[data-dcats-inline-style="s-43bfddd44fa6"] { background:#fff;border-radius:16px;padding:28px 28px 20px;width:100%;max-width:400px;box-shadow:0 4px 20px rgba(0,0,0,0.08) }
[data-dcats-inline-style="s-49d89bbf02c3"] { font-size:34px }
[data-dcats-inline-style="s-4deab6bc5df6"] { border-bottom:1px solid #f0f0f0 }
[data-dcats-inline-style="s-51377a917eb3"] { grid-column:1/-1 }
[data-dcats-inline-style="s-5e9694825756"] { max-width:150px }
[data-dcats-inline-style="s-619ae7a66513"] { font-size:11px;color:#aaa;text-align:right }
[data-dcats-inline-style="s-643d1c842c81"] { font-family:monospace;font-size:12px }
[data-dcats-inline-style="s-64b190ce5756"] { font-size:11px;color:#aaa;margin-top:4px }
[data-dcats-inline-style="s-6630b0afce79"] { font-size:18px;font-weight:700;color:#1a1a2e;margin-bottom:18px }
[data-dcats-inline-style="s-69374f356aba"] { display:flex;gap:6px }
[data-dcats-inline-style="s-6aa34d7432e7"] { display:none }
[data-dcats-inline-style="s-70170ef85d51"] { padding:5px 4px;font-family:monospace }
[data-dcats-inline-style="s-75be3216d07d"] { grid-column:1 / -1 }
[data-dcats-inline-style="s-7850688acbb3"] { font-size:24px;margin-bottom:8px }
[data-dcats-inline-style="s-78bcb771b87d"] { flex:1;display:flex;align-items:flex-start;justify-content:center;padding:32px 16px;background:#f0f2f5 }
[data-dcats-inline-style="s-7b8c3df56487"] { font-family:monospace }
[data-dcats-inline-style="s-7be3925bdca3"] { padding:14px }
[data-dcats-inline-style="s-8427b30d6f5f"] { font-size:13px;font-weight:600;color:#1a1a2e }
[data-dcats-inline-style="s-928d79dfb0e2"] { color:#bbb;font-size:12px;padding:8px 0 }
[data-dcats-inline-style="s-92c18f6bdac1"] { margin-top:16px }
[data-dcats-inline-style="s-92c2ce5a554a"] { padding:5px 4px;text-align:left;font-size:11px;color:#555 }
[data-dcats-inline-style="s-9ebc7006bd8c"] { padding:5px 4px;color:#aaa }
[data-dcats-inline-style="s-a0925a28f0a3"] { margin-top:0 }
[data-dcats-inline-style="s-a0e05151e008"] { font-size:18px;font-weight:700;color:#1a1a2e;margin-bottom:6px }
[data-dcats-inline-style="s-adb7c4442a0f"] { font-size:9px;color:#8899bb;margin-left:4px }
[data-dcats-inline-style="s-b64233878f4f"] { width:100%;border-collapse:collapse;font-size:12px }
[data-dcats-inline-style="s-b876d2a73886"] { padding:10px 12px;border-bottom:1px solid #f0f2f5 }
[data-dcats-inline-style="s-c4f7723a6395"] { margin:4px 0 0 18px;padding:0 }
[data-dcats-inline-style="s-cbf07ff3b656"] { font-size:9px;color:#556688;margin-left:4px }
[data-dcats-inline-style="s-cce7201d5294"] { font-size:10px;color:#ccc }
[data-dcats-inline-style="s-d097f1ffa2b6"] { color:#aaa;font-size:12px;padding:8px 0 }
[data-dcats-inline-style="s-df5afa5a8563"] { max-width:420px }
[data-dcats-inline-style="s-df928149c547"] { margin-top:10px }
[data-dcats-inline-style="s-eb2cdaa55e9f"] { margin-top:4px }
[data-dcats-inline-style="s-eb99a4c193ed"] { white-space:nowrap }
[data-dcats-inline-style="s-eb9e070a2eee"] { max-width:160px }
[data-dcats-inline-style="s-ece6801155a3"] { background:#fff;border:1px solid #e8e8e8;border-radius:10px;padding:12px 14px;margin-bottom:10px }
[data-dcats-inline-style="s-f080fac55fa0"] { background:#f5f7fa }
[data-dcats-inline-style="s-f9683654d1a0"] { font-size:11px;color:#aaa;font-weight:400 }
[data-dcats-display="none"] { display: none !important; }
[data-dcats-display="block"] { display: block !important; }
[data-dcats-display="flex"] { display: flex !important; }
[data-dcats-display="grid"] { display: grid !important; }
[data-dcats-color="888"] { color: #888 !important; }
[data-dcats-color="b07800"] { color: #b07800 !important; }
[data-dcats-color="c0392b"] { color: #c0392b !important; }
[data-dcats-color="e24b4a"] { color: #e24b4a !important; }
[data-dcats-color="d33"] { color: #d33 !important; }
[data-dcats-color="64748b"] { color: #64748b !important; }
[data-dcats-color="1a8c3e"] { color: #1a8c3e !important; }
[data-dcats-color="667085"] { color: #667085 !important; }
[data-dcats-color="f5a623"] { color: #f5a623 !important; }
[data-dcats-color="27ae60"] { color: #27ae60 !important; }
[data-dcats-background="eee"] { background: #eee !important; }
[data-dcats-background="e24b4a"] { background: #e24b4a !important; }
[data-dcats-background="f5a623"] { background: #f5a623 !important; }
[data-dcats-background="27ae60"] { background: #27ae60 !important; }
[data-dcats-background="1a8c3e"] { background: #1a8c3e !important; }
[data-dcats-width="0"] { width: 0% !important; }
[data-dcats-width="20"] { width: 20% !important; }
[data-dcats-width="40"] { width: 40% !important; }
[data-dcats-width="60"] { width: 60% !important; }
[data-dcats-width="80"] { width: 80% !important; }
[data-dcats-width="100"] { width: 100% !important; }
.ec-history-rebuilt-rakuten { background: #d63384; }
.ec-history-rebuilt-yahoo-shopping { background: #9f2f7f; }
.ec-history-rebuilt-yahoo-auction { background: #f472b6; }
.ec-history-new-rakuten { background: #1a6fd4; }
.ec-history-new-yahoo-shopping { background: #0f9f9a; }
.ec-history-new-yahoo-auction { background: #7c3aed; }
.ec-history-used-rakuten { background: #6b7280; }
.ec-history-used-yahoo-shopping { background: #92400e; }
.ec-history-used-yahoo-auction { background: #475467; }
.ec-history-default { background: #667085; }

/* Component compatibility management */
.component-compat-body { max-width: 1600px; }
.component-compat-toolbar .mgmt-search { flex: 1 1 440px; }
.component-compat-toolbar .form-select { flex: 0 0 170px; }
.component-compat-notice {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-left: 3px solid #3276c8;
  background: #eef5fc;
  color: #35506d;
  font-size: 13px;
}
.component-compat-layout {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  min-height: 620px;
  border: 1px solid #d7dde5;
  background: #fff;
}
.component-compat-search-pane {
  min-width: 0;
  border-right: 1px solid #d7dde5;
  background: #f7f9fb;
}
.component-compat-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid #d7dde5;
  background: #fff;
}
.component-compat-pane-head .mgmt-count { margin: 0; }
.component-compat-name-filterbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid #d7dde5;
  background: #fff;
}
.component-compat-name-filterbar label {
  color: #526174;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.component-compat-name-filterbar .form-select { width: 100%; min-width: 0; }
.component-compat-results { max-height: 700px; overflow-y: auto; }
.component-compat-result {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #e1e6ec;
  background: transparent;
  color: #172234;
  text-align: left;
  cursor: pointer;
}
.component-compat-result:hover,
.component-compat-result.active { background: #e8f1fb; }
.component-compat-result.active { box-shadow: inset 3px 0 #2468b2; }
.component-compat-result > .component-compat-meta { display: block; }
.component-compat-result-title { display: block; min-width: 0; }
.component-compat-result-label {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
.component-compat-result-value {
  display: block;
  overflow-wrap: anywhere;
  color: #172234;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.component-compat-result-number {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  margin-top: 7px;
}
.component-compat-result-top,
.component-compat-selected-top,
.component-compat-link-top,
.component-compat-assist-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.component-compat-pn {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 700;
}
.component-compat-meta {
  margin-top: 4px;
  color: #607087;
  font-size: 12px;
  line-height: 1.45;
}
.component-compat-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid #a9bfd8;
  border-radius: 4px;
  background: #edf4fb;
  color: #315b86;
  font-size: 11px;
  font-weight: 700;
}
.component-compat-badge.manual {
  border-color: #c8b990;
  background: #fff8df;
  color: #6f5a21;
}
.component-compat-badge.scoped {
  border-color: #c6cad1;
  background: #f0f1f3;
  color: #5a606b;
}
.component-compat-detail-pane { min-width: 0; background: #fff; }
.component-compat-empty { padding: 90px 20px; color: #7b8798; text-align: center; }
.component-compat-selected {
  padding: 18px 20px;
  border-bottom: 1px solid #d7dde5;
  background: #fbfcfd;
}
.component-compat-selected .component-compat-pn { font-size: 20px; }
.component-compat-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid #cfd6df;
}
.component-compat-tab {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #526174;
  font-weight: 700;
  cursor: pointer;
}
.component-compat-tab.active { border-bottom-color: #2468b2; color: #174f8b; }
.component-compat-tab-panel { display: none; padding: 18px 20px 28px; }
.component-compat-tab-panel.active { display: block; }
.component-compat-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.component-compat-actionbar strong,
.component-compat-actionbar span { display: block; }
.component-compat-actionbar span { margin-top: 3px; color: #66758a; font-size: 12px; }
.component-compat-link,
.component-compat-assist-item { padding: 13px 14px; border-top: 1px solid #e0e5eb; }
.component-compat-link:last-child,
.component-compat-assist-item:last-child { border-bottom: 1px solid #e0e5eb; }
.component-compat-link-actions,
.component-compat-assist-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}
.component-compat-assist-actions .form-select { min-width: 230px; max-width: 340px; }
.component-compat-assist-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.component-compat-assist-toolbar .form-select { width: auto; min-width: 140px; max-width: 280px; }
.component-compat-select-all { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 12px; color: #334155; }
.component-compat-assist-summary { padding: 10px 14px; border-bottom: 1px solid #d7dde5; background: #f7f9fc; color: #334155; font-size: 12px; }
.component-compat-assist-check { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.component-compat-assist-check input { flex: 0 0 auto; margin-top: 5px; }
.component-compat-assist-check > span { display: block; min-width: 0; }
.component-compat-assist-check .component-compat-pn,
.component-compat-assist-check .component-compat-meta { display: block; }
.component-compat-existing-picker { margin: 12px 0 16px; padding: 12px; border: 1px solid #d7dde5; border-radius: 6px; background: #f7f9fc; }
.component-compat-existing-kind-row {
  display: grid;
  grid-template-columns: auto minmax(0, 180px);
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.component-compat-existing-kind-row label { color: #526174; font-size: 12px; font-weight: 700; }
.component-compat-existing-kind-row .form-select { width: 100%; min-width: 0; }
.component-compat-existing-search-row { display: flex; align-items: center; gap: 8px; }
.component-compat-existing-search-row .form-input { flex: 1 1 auto; min-width: 0; }
.component-compat-existing-results { margin-top: 8px; max-height: 180px; overflow-y: auto; color: #66758a; font-size: 12px; }
.component-compat-existing-result { width: 100%; padding: 9px 10px; border: 0; border-top: 1px solid #dfe5ec; background: #fff; color: #1f2937; text-align: left; cursor: pointer; }
.component-compat-existing-result:first-child { border-top: 0; }
.component-compat-existing-result:hover,
.component-compat-existing-result.active { background: #e8f1fb; }
.component-compat-existing-result strong,
.component-compat-existing-result span { display: block; }
.component-compat-existing-result span { margin-top: 2px; color: #66758a; font-size: 11px; }
.component-compat-sync-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #d7dde5;
  background: #f7f9fb;
  color: #34465b;
  font-size: 13px;
}
.component-compat-form-card { max-width: 720px; }

.dcats-auto-notice {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 20000;
  width: max-content;
  max-width: min(560px, calc(100vw - 28px));
  padding: 12px 16px;
  transform: translateX(-50%);
  border: 1px solid #8fc8a2;
  border-radius: 10px;
  background: #e8f7ed;
  box-shadow: 0 8px 24px rgba(20, 54, 36, 0.2);
  color: #185c31;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
}
.dcats-auto-notice[hidden] { display: none; }
.dcats-auto-notice.warning {
  border-color: #e0aa3e;
  background: #fff6dd;
  box-shadow: 0 8px 24px rgba(91, 63, 16, 0.2);
  color: #7a4d00;
}

@media (max-width: 860px) {
  .component-compat-layout { grid-template-columns: 1fr; }
  .component-compat-search-pane { border-right: 0; border-bottom: 1px solid #d7dde5; }
  .component-compat-results { max-height: 330px; }
  .component-compat-actionbar,
  .component-compat-assist-top { align-items: stretch; flex-direction: column; }
  .component-compat-assist-toolbar { align-items: stretch; justify-content: flex-start; }
  .component-compat-assist-toolbar .form-select { width: 100%; max-width: none; }
  .component-compat-assist-actions { align-items: stretch; flex-direction: column; }
  .component-compat-assist-actions .form-select { width: 100%; max-width: none; }
}

@media (max-width: 600px) {
  .dcats-auto-notice {
    bottom: max(14px, env(safe-area-inset-bottom));
    width: calc(100vw - 28px);
    max-width: none;
    padding: 11px 13px;
    font-size: 13px;
  }
}

/* =============================================
   得意先注文・受注出荷管理
============================================= */
.customer-portal-order-band { padding: 22px 0; border-bottom: 1px solid #ead5d8; background: #fff8f9; }
.customer-portal-order-band h2 { color: #431d23; font-size: 14px; letter-spacing: 0; }
.customer-portal-order-button,
.customer-catalog-order-link { min-height: 36px; border: 1px solid var(--dcats-customer-green); border-radius: var(--dcats-control-radius); padding: 0 14px; background: var(--dcats-customer-green); color: #fff; font-size: var(--dcats-type-supporting); font-weight: 800; cursor: pointer; white-space: nowrap; }
.customer-portal-order-button { min-height: 42px; flex: 0 0 auto; padding: 0 18px; font-size: 13px; }
.customer-portal-order-button:hover,
.customer-catalog-order-link:hover { background: var(--dcats-customer-green-hover); }
.customer-catalog-order-button { display: block; width: calc(100% - 20px); min-height: var(--dcats-control-height); margin: 0 10px 10px; border: 1px solid var(--dcats-customer-green); border-radius: var(--dcats-control-radius); background: #fff; color: var(--dcats-customer-green); font-size: var(--dcats-type-supporting); font-weight: 800; cursor: pointer; }
.customer-catalog-order-button:hover { background: var(--dcats-success-bg); }
.customer-catalog-order-button.added { border-color: #27734f; background: #eef8f2; color: #1d6544; }
.customer-catalog-order-button:disabled { border-color: #cfd6d3; background: #f4f6f5; color: #8b9591; cursor: not-allowed; }

.customer-order-body { flex: 1; background: #f5f7f6; color: var(--dcats-ink); font-size: var(--dcats-type-body); }
.customer-order-heading-band { border-bottom: 1px solid #d8e0dd; background: #fff; }
.customer-order-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 20px; padding-bottom: 18px; }
.customer-order-heading h1 { margin-top: 3px; color: #17231f; font-size: 24px; letter-spacing: 0; }
.customer-order-heading p { margin-top: 7px; color: #51625a; font-size: 12px; }
.customer-order-development-preview-band { border-bottom: 1px solid #e7c567; background: #fff7dd; }
.customer-order-development-preview-copy { min-height: 48px; display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.customer-order-development-preview-copy strong { flex: 0 0 auto; border: 1px solid #bd7c00; border-radius: var(--dcats-control-radius); padding: 3px 7px; background: #fff; color: #8a5700; font-size: var(--dcats-type-supporting); }
.customer-order-development-preview-copy span { color: #6b4a0a; font-size: var(--dcats-type-supporting); font-weight: 700; line-height: 1.5; }
.customer-order-workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(350px, .55fr); align-items: start; gap: 0; padding-top: 22px; padding-bottom: 42px; }
.customer-order-workspace[hidden],
.customer-order-history[hidden] { display: none !important; }
.customer-order-cart-pane { min-width: 0; border: 1px solid var(--dcats-border); border-right: 0; border-radius: var(--dcats-card-radius) 0 0 var(--dcats-card-radius); padding: 20px; background: #fff; }
.customer-order-shipping-pane { position: sticky; top: 70px; min-width: 0; border: 1px solid var(--dcats-border); border-radius: 0 var(--dcats-card-radius) var(--dcats-card-radius) 0; padding: 20px; background: #f9fbfa; }
.customer-order-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.customer-order-section-head.compact { margin-bottom: 12px; }
.customer-order-section-head h2 { color: #25362e; font-size: var(--dcats-type-heading); letter-spacing: 0; }
.customer-order-section-head p { margin-top: var(--dcats-space-1); color: #718078; font-size: var(--dcats-type-supporting); line-height: 1.5; }
.customer-order-secondary-button { min-height: var(--dcats-control-height); border: 1px solid #9fafaa; border-radius: var(--dcats-control-radius); padding: 0 var(--dcats-space-3); background: #fff; color: #31433b; font-size: var(--dcats-type-body); font-weight: 800; cursor: pointer; white-space: nowrap; }
.customer-order-secondary-button:hover { background: #f1f5f3; }
.customer-order-secondary-button:disabled { border-color: #cfd6d3; background: #ecefed; color: #87918c; cursor: not-allowed; }
.customer-order-address-book { margin-bottom: 14px; border-top: 1px solid #dce3e0; border-bottom: 1px solid #dce3e0; padding: 12px 0; }
.customer-order-address-book-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.customer-order-address-book-head > div { min-width: 0; }
.customer-order-address-book-head strong { display: block; color: #31433b; font-size: var(--dcats-type-body); }
.customer-order-address-book-head span { display: block; margin-top: var(--dcats-space-1); color: #75827c; font-size: var(--dcats-type-supporting); line-height: 1.45; }
.customer-order-address-book-head .customer-order-secondary-button { min-height: var(--dcats-control-height); padding: 0 10px; font-size: var(--dcats-type-supporting); }
.customer-order-address-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 9px; }
.customer-order-address-search-row input { width: 100%; min-width: 0; height: var(--dcats-control-height); border: 1px solid var(--dcats-border); border-radius: var(--dcats-control-radius); padding: 0 10px; background: #fff; color: #1b2923; font-size: var(--dcats-type-body); outline: none; }
.customer-order-address-search-row input:focus { border-color: var(--dcats-focus); box-shadow: var(--dcats-focus-ring); }
.customer-order-address-search-button { min-width: 62px; min-height: var(--dcats-control-height); border: 1px solid var(--dcats-customer-green); border-radius: var(--dcats-control-radius); padding: 0 10px; background: var(--dcats-customer-green); color: #fff; font-size: var(--dcats-type-body); font-weight: 800; cursor: pointer; }
.customer-order-address-search-button:hover { background: var(--dcats-customer-green-hover); }
.customer-order-address-search-button:disabled { border-color: #c8d0cc; background: #dfe4e2; color: #89938f; cursor: not-allowed; }
.customer-order-address-status { min-height: 17px; padding-top: 5px; color: #65736d; font-size: var(--dcats-type-supporting); line-height: 1.45; }
.customer-order-address-status.error { color: #b42318; }
.customer-order-address-results { max-height: 180px; overflow-y: auto; border: 1px solid var(--dcats-border); border-radius: var(--dcats-card-radius); background: #fff; }
.customer-order-address-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; border: 0; border-bottom: 1px solid #e2e8e5; padding: 9px 10px; background: #fff; color: #26352f; text-align: left; cursor: pointer; }
.customer-order-address-result:last-child { border-bottom: 0; }
.customer-order-address-result:hover { background: #f0f7f3; }
.customer-order-address-result strong,
.customer-order-address-result span,
.customer-order-address-result small { min-width: 0; overflow-wrap: anywhere; }
.customer-order-address-result strong { font-size: var(--dcats-type-body); }
.customer-order-address-result span { color: #365f4d; font-size: var(--dcats-type-supporting); font-weight: 700; }
.customer-order-address-result small { grid-column: 1 / -1; margin-top: 3px; color: #707d77; font-size: var(--dcats-type-supporting); line-height: 1.45; }
.customer-order-status { min-height: 19px; margin-bottom: 8px; color: #236344; font-size: var(--dcats-type-supporting); font-weight: 700; }
.customer-order-status.error,
.customer-order-empty.error { color: #b42318; }
.customer-order-cart-list { border-top: 1px solid #dce3e0; }
.customer-order-empty { padding: 42px 18px; color: #7b8782; font-size: 12px; text-align: center; }
.customer-order-line { display: grid; grid-template-columns: minmax(68px, .7fr) repeat(3, minmax(0, 1fr)); align-items: center; gap: 12px; min-height: 94px; border-bottom: 1px solid #e1e7e4; padding: 12px 0; }
.customer-order-product { min-width: 0; }
#customer-order-cart-list .customer-order-product { grid-column: 1 / -2; grid-row: 1; }
#customer-order-cart-list .customer-order-qty { min-width: 0; grid-column: 1; grid-row: 2; }
#customer-order-cart-list .customer-order-line > .product-price { grid-column: 2; grid-row: 2; }
#customer-order-cart-list .customer-order-line > .core-charge { grid-column: 3; grid-row: 2; }
#customer-order-cart-list .customer-order-line > .total { grid-column: 4; grid-row: 2; }
.customer-order-product > span { display: block; color: var(--dcats-customer-green); font-size: var(--dcats-type-supporting); font-weight: 800; }
.customer-order-product strong { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #17231f; font-size: 15px; }
.customer-order-product small { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #65736d; font-size: var(--dcats-type-supporting); }
.customer-order-product em { display: inline-block; margin-top: 7px; border: 1px solid #ef9a91; border-radius: var(--dcats-control-radius); padding: 2px 6px; background: var(--dcats-danger-bg); color: #b42318; font-size: var(--dcats-type-supporting); font-style: normal; font-weight: 800; }
.customer-order-product em.charge-no-return { border-color: #d2a543; background: #fff8df; color: #76520d; }
.customer-order-core-choice { display: grid; gap: 4px; width: min(100%, 300px); margin-top: 8px; }
.customer-order-core-choice > span { color: #4d5d55; font-size: var(--dcats-type-supporting); font-weight: 800; }
.customer-order-core-choice select { width: 100%; min-width: 0; height: 34px; border: 1px solid var(--dcats-border-strong); border-radius: var(--dcats-control-radius); padding: 0 8px; background: #fff; color: #26352f; font-size: var(--dcats-type-supporting); font-weight: 700; }
.customer-order-core-choice small { color: #65736d; font-size: var(--dcats-type-supporting); font-weight: 700; line-height: 1.45; }
.customer-order-core-choice small.setup-required { color: #a23a31; }
.customer-order-qty span,
.customer-order-line-metric span { display: block; margin-bottom: 4px; color: #74817b; font-size: var(--dcats-type-supporting); font-weight: 800; }
.customer-order-qty input { width: 68px; height: var(--dcats-control-height); border: 1px solid var(--dcats-border); border-radius: var(--dcats-control-radius); padding: 0 7px; color: #17231f; font-size: var(--dcats-type-body); text-align: right; }
.customer-order-line-metric { min-width: 0; text-align: right; }
.customer-order-line-metric strong { display: block; color: #26352f; font-size: var(--dcats-type-body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.customer-order-line-metric.core-charge strong,
.sales-order-core-charge,
.customer-order-line-metric.total strong { color: #15231d; font-size: 14px; }
.customer-order-line-metric small { display: block; color: #69766f; font-size: var(--dcats-type-supporting); line-height: 1.45; }
.customer-order-line-metric small.compatible-stock { margin-top: 3px; overflow-wrap: normal; color: #236344; font-weight: 800; word-break: keep-all; }
.customer-order-remove { width: 28px; height: 28px; border: 1px solid #d6ddda; border-radius: 50%; background: #fff; color: #8a9590; font-size: 17px; line-height: 1; cursor: pointer; }
#customer-order-cart-list .customer-order-remove { grid-column: -2; grid-row: 1; justify-self: end; display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 76px; min-height: 40px; border: 1px solid #dba6a0; border-radius: var(--dcats-control-radius); background: #fff7f6; color: #a12c22; font-size: 12px; font-weight: 800; line-height: 1.2; cursor: pointer; }
#customer-order-cart-list .customer-order-remove > span { font-size: 22px; }
#customer-order-cart-list .customer-order-remove:focus-visible { outline: 3px solid #1c654f; outline-offset: 2px; }
#customer-order-cart-list .customer-order-remove:disabled { opacity: .55; cursor: default; }
.customer-order-price-editor { display: block; min-width: 0; }
#customer-order-cart-list .customer-order-price-editor input { box-sizing: border-box; width: 100%; min-width: 0; height: var(--dcats-control-height); border: 1px solid var(--dcats-border); border-radius: var(--dcats-control-radius); padding: 0 6px; background: #fff; color: #17231f; font-size: 14px; text-align: right; }
#customer-order-cart-list .customer-order-price-editor input:focus-visible { outline: 3px solid #1c654f; outline-offset: 2px; }
#customer-order-cart-list .customer-order-price-editor input[aria-invalid='true'] { border-color: #b42318; }
.customer-order-price-editor small { margin-top: 4px; text-align: left; }
.customer-order-line-metric strong { white-space: normal; overflow-wrap: anywhere; }

.customer-order-remove:hover { border-color: #e39ca5; color: var(--dcats-brand-red); }
.customer-order-preview-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); margin-top: 16px; border-top: 2px solid #ccd7d2; background: #f6f9f7; }
.customer-order-preview-summary > div { min-width: 0; border-right: 1px solid #dde5e1; padding: 12px; text-align: right; }
.customer-order-preview-summary > div:last-child { border-right: 0; }
.customer-order-preview-summary span { display: block; color: #6c7973; font-size: var(--dcats-type-supporting); font-weight: 800; }
.customer-order-preview-summary strong { display: block; margin-top: 4px; color: #1e2e27; font-size: 14px; font-variant-numeric: tabular-nums; }
.customer-order-preview-summary .grand-total { background: #edf7f1; }
.customer-order-preview-summary .grand-total strong { color: #17613f; font-size: 17px; }
.customer-order-preview-summary p { grid-column: 1 / -1; padding: 14px; color: #79857f; font-size: var(--dcats-type-supporting); text-align: center; }
.customer-order-vehicle-section { margin-top: 18px; border-top: 1px solid #dce3e0; padding-top: 16px; }
.customer-order-vehicle-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.customer-order-vehicle-heading h3 { color: #25362e; font-size: var(--dcats-type-heading); letter-spacing: 0; }
.customer-order-vehicle-heading span { color: #718078; font-size: var(--dcats-type-supporting); line-height: 1.5; text-align: right; }
.customer-order-vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-order-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.customer-order-form-grid label { min-width: 0; }
.customer-order-form-grid label.wide { grid-column: 1 / -1; }
.customer-order-destination-type { position: relative; grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0 0 2px; border: 0; }
.customer-order-destination-type legend { margin-bottom: 5px; color: #53635b; font-size: var(--dcats-type-supporting); font-weight: 800; }
.customer-order-destination-type-select { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.customer-order-destination-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; border: 1px solid #aebdb6; border-radius: var(--dcats-control-radius); overflow: hidden; background: #fff; }
.customer-order-destination-choice label { position: relative; min-width: 0; cursor: pointer; }
.customer-order-destination-choice label + label { border-left: 1px solid #c8d4ce; }
.customer-order-destination-choice input { position: absolute; opacity: 0; pointer-events: none; }
.customer-order-destination-choice span { display: flex; align-items: center; justify-content: center; min-height: var(--dcats-control-height); padding: 7px 10px; color: #526159; font-size: var(--dcats-type-body); font-weight: 800; line-height: 1.35; text-align: center; }
.customer-order-destination-choice input:checked + span { background: var(--dcats-customer-green); color: #fff; }
.customer-order-destination-choice label:hover span { background: #edf5f1; }
.customer-order-destination-choice input:checked + span:hover { background: var(--dcats-customer-green); }
.customer-order-destination-choice input:focus-visible + span { position: relative; z-index: 1; outline: 2px solid var(--dcats-focus); outline-offset: -2px; }
.customer-order-yamato-office-panel { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); min-width: 0; gap: 10px 14px; border-left: 3px solid #e2b82e; padding: 10px 12px; background: #fff9e8; }
.customer-order-yamato-office-panel[hidden] { display: none; }
.customer-order-yamato-office-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; min-width: 0; }
.customer-order-yamato-office-picker > label { min-width: 0; }
.customer-order-yamato-office-custom-button { min-height: var(--dcats-control-height); padding: 0 11px; white-space: nowrap; }
.customer-order-yamato-office-custom-fields { grid-column: 1 / -1; display: grid; gap: 8px; border-top: 1px solid #e5d9ad; padding-top: 10px; }
.customer-order-yamato-office-custom-fields[hidden] { display: none; }
.customer-order-yamato-office-custom-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.customer-order-yamato-office-custom-heading strong { color: #3c3320; font-size: var(--dcats-type-body); }
.customer-order-yamato-office-custom-heading a { color: #17679f; font-size: var(--dcats-type-supporting); font-weight: 800; white-space: nowrap; }
.customer-order-yamato-office-custom-grid { display: grid; grid-template-columns: minmax(180px, .55fr) minmax(240px, 1.45fr); gap: 10px; }
.customer-order-yamato-office-custom-fields > small { color: #6c6041; font-size: var(--dcats-type-supporting); font-weight: 700; line-height: 1.45; }
.customer-order-yamato-office-summary { display: grid; align-content: center; gap: 3px; min-width: 0; }
.customer-order-yamato-office-summary[hidden] { display: none; }
.customer-order-yamato-office-summary strong { color: #3c3320; font-size: var(--dcats-type-body); overflow-wrap: anywhere; }
.customer-order-yamato-office-summary span { color: #6c6041; font-size: var(--dcats-type-supporting); font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.sales-order-office-pickup-badge { align-self: flex-start; border: 1px solid #d1aa28; border-radius: 4px; padding: 3px 6px; background: #fff7d9; color: #6c5310; font-size: var(--dcats-type-supporting); font-style: normal; font-weight: 900; }
.customer-order-shipping-methods { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 2px; padding-top: 10px; border-top: 1px solid #dce3e0; }
.customer-order-shipping-method { display: grid; grid-template-columns: minmax(112px, .42fr) minmax(0, 1fr); align-items: center; gap: 3px 9px; border-left: 3px solid #287356; padding: 8px 9px; background: #f1f7f4; }
.customer-order-shipping-method[hidden] { display: none !important; }
.customer-order-shipping-method.core-return { border-left-color: #b85a45; background: #fff5f2; }
.customer-order-shipping-method > span { color: #2e4b3e; font-size: 10px; font-weight: 800; }
.customer-order-shipping-method.core-return > span { color: #8b3b2e; }
.customer-order-shipping-method > select { grid-column: 2; grid-row: 1 / span 2; }
.customer-order-shipping-method > small { grid-column: 1; color: #718078; font-size: 8px; font-weight: 700; line-height: 1.45; }
.customer-order-shipping-date-field { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(112px, .42fr) minmax(0, 1fr); align-items: center; gap: 9px; border-left: 3px solid #287356; padding: 8px 9px; background: #edf7f1; }
.customer-order-shipping-date-field > span { margin-bottom: 0 !important; color: #205a42 !important; }
.customer-order-shipping-date-field > input:disabled { opacity: 1; background: #fff; color: #173d2e; font-weight: 800; cursor: default; }
.customer-order-delivery-estimate { grid-column: 1 / -1; min-height: var(--dcats-control-height); border-left: 3px solid #8da49a; padding: 8px 10px; background: #f1f5f3; color: #526159; font-size: var(--dcats-type-supporting); font-weight: 700; line-height: 1.55; }
.customer-order-delivery-estimate.ready { border-left-color: #287356; background: #edf7f1; color: #205a42; }
.customer-order-delivery-estimate.restricted { border-left-color: #b87818; background: #fff7e8; color: #795216; }
.customer-order-delivery-estimate.warning { border-left-color: #b87818; background: #fff9ef; color: #765522; }
.customer-order-delivery-estimate.error { border-left-color: #c33d32; background: #fff1f0; color: #a12d24; }
.customer-order-form-grid label > span { display: block; margin-bottom: 4px; color: #526159; font-size: var(--dcats-type-supporting); font-weight: 800; }
.customer-order-form-field { min-width: 0; }
.customer-order-form-field > label { display: block; margin-bottom: 4px; color: #526159; font-size: var(--dcats-type-supporting); font-weight: 800; }
.customer-order-form-grid input,
.customer-order-form-grid select,
.customer-order-form-grid textarea { width: 100%; min-width: 0; border: 1px solid var(--dcats-border); border-radius: var(--dcats-control-radius); padding: 8px 10px; background: #fff; color: #1b2923; font: inherit; font-size: var(--dcats-type-body); outline: none; }
.customer-order-form-grid input,
.customer-order-form-grid select { height: var(--dcats-control-height); }
.customer-order-form-grid textarea { resize: vertical; }
.customer-order-form-grid input:focus,
.customer-order-form-grid select:focus,
.customer-order-form-grid textarea:focus { border-color: var(--dcats-focus); box-shadow: var(--dcats-focus-ring); }
.customer-order-postal-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.customer-order-postal-row button { min-width: 64px; height: var(--dcats-control-height); border: 1px solid var(--dcats-customer-green); border-radius: var(--dcats-control-radius); padding: 0 8px; background: #fff; color: var(--dcats-customer-green); font-size: var(--dcats-type-supporting); font-weight: 800; cursor: pointer; white-space: nowrap; }
.customer-order-postal-row button:hover { background: #edf7f1; }
.customer-order-postal-row button:disabled { border-color: #c8d0cc; background: #eef1ef; color: #89938f; cursor: not-allowed; }
.customer-order-postal-field > small { display: block; min-height: 15px; margin-top: 4px; color: #75827c; font-size: var(--dcats-type-supporting); line-height: 1.45; }
.customer-order-postal-field > small.error { color: #b42318; }
.customer-order-postal-results { grid-column: 1 / -1; margin-top: 5px; border: 1px solid var(--dcats-border); border-radius: var(--dcats-card-radius); background: #fff; }
.customer-order-postal-result { display: block; width: 100%; border: 0; border-bottom: 1px solid #e2e8e5; padding: 7px 8px; background: #fff; color: #304039; font-size: var(--dcats-type-supporting); line-height: 1.45; text-align: left; cursor: pointer; }
.customer-order-postal-result:last-child { border-bottom: 0; }
.customer-order-postal-result:hover { background: #f0f7f3; }
.customer-order-postal-test { grid-column: 1 / -1; margin-top: 7px; border: 1px solid var(--dcats-border); border-radius: var(--dcats-card-radius); padding: 7px; background: #f7faf8; }
.customer-order-postal-test-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.customer-order-postal-test-head strong { color: #3d4f47; font-size: var(--dcats-type-supporting); }
.customer-order-postal-test-head span { min-width: 0; color: #68766f; font-size: var(--dcats-type-supporting); line-height: 1.4; text-align: right; }
.customer-order-postal-mode { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--dcats-border); border-radius: var(--dcats-control-radius); overflow: hidden; }
.customer-order-postal-mode button { min-width: 0; height: var(--dcats-control-height); border: 0; border-right: 1px solid #c8d4ce; padding: 0 5px; background: #fff; color: #526159; font-size: var(--dcats-type-supporting); font-weight: 800; cursor: pointer; white-space: nowrap; }
.customer-order-postal-mode button:last-child { border-right: 0; }
.customer-order-postal-mode button:hover { background: #edf5f1; }
.customer-order-postal-mode button.active { background: var(--dcats-customer-green); color: #fff; }
.customer-order-postal-mode button:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--dcats-focus); outline-offset: -2px; }
.form-card.sales-order-postal-settings-card { width: min(520px, calc(100vw - 24px)); max-width: 520px; border-radius: 8px; padding: 0; overflow: hidden; }
.sales-order-postal-settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d8dfdb; padding: 18px 20px 14px; }
.sales-order-postal-settings-heading span { color: #287356; font-size: 9px; font-weight: 900; }
.sales-order-postal-settings-heading h3 { margin: 2px 0 0; color: #1d2c25; font-size: 19px; letter-spacing: 0; }
.sales-order-postal-settings-heading p { margin-top: 5px; color: #68766f; font-size: 10px; line-height: 1.5; }
.sales-order-postal-settings-heading button { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid #c8d1cc; border-radius: 5px; background: #fff; color: #617068; cursor: pointer; }
.sales-order-postal-settings-card .customer-order-postal-test { grid-column: auto; margin: 18px 20px; }
.sales-order-postal-settings-card .form-footer { margin-top: 0; padding: 14px 20px; }
.customer-order-core-notice { margin-top: 12px; border-left: 3px solid #d64545; padding: 9px 10px; background: var(--dcats-danger-bg); color: #8f2f2f; font-size: var(--dcats-type-supporting); font-weight: 700; line-height: 1.55; }
.customer-order-submit-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #dce3e0; }
.customer-order-submit-button { min-height: var(--dcats-control-height); border: 1px solid var(--dcats-customer-green); border-radius: var(--dcats-control-radius); background: var(--dcats-customer-green); color: #fff; font-size: var(--dcats-type-body); font-weight: 800; cursor: pointer; }
.customer-order-submit-button:hover { background: var(--dcats-customer-green-hover); }
.customer-order-submit-button:disabled { border-color: #cfd6d3; background: #dfe4e2; color: #89938f; cursor: not-allowed; }
.customer-order-history { padding-top: 22px; padding-bottom: 42px; }
.customer-order-history > .customer-order-section-head { justify-content: flex-end; }
.customer-order-history-list { display: grid; gap: 14px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.customer-order-history-row { display: grid; grid-template-columns: minmax(160px, .8fr) minmax(220px, 1.5fr) 130px minmax(260px, 1fr); align-items: center; gap: 18px; border: 1px solid var(--dcats-border); border-radius: var(--dcats-card-radius); padding: 15px 16px; background: #fff; overflow: hidden; }
.customer-order-history-row > div:first-child strong { display: inline-block; margin-left: 8px; color: #245f49; font-size: var(--dcats-type-supporting); }
.customer-order-number { color: #17231f; font-size: var(--dcats-type-body); font-weight: 800; }
.customer-order-history-row small { display: block; margin-top: 4px; color: #74817b; font-size: var(--dcats-type-supporting); }
.customer-order-history-items { color: #34443d; font-size: var(--dcats-type-body); line-height: 1.55; }
.customer-order-history-vehicle { margin-top: 7px; border-left: 2px solid #7ea895; padding-left: 7px; color: #52675e; line-height: 1.5; }
.customer-order-history-vehicle strong { color: #285e48; }
.customer-order-history-total { text-align: right; }
.customer-order-history-total span { display: block; color: #74817b; font-size: 9px; }
.customer-order-history-total strong { color: #17231f; font-size: 14px; }
.customer-order-history-row dl { display: grid; gap: 4px; }
.customer-order-history-row dl > div { display: grid; grid-template-columns: 92px 1fr; gap: 7px; }
.customer-order-history-row dt { color: #74817b; font-size: var(--dcats-type-supporting); }
.customer-order-history-row dd { overflow-wrap: anywhere; color: #2d3b35; font-size: var(--dcats-type-body); font-weight: 700; }
.customer-order-history-detail { grid-column: 1 / -1; border-top: 1px solid #dfe6e2; padding-top: 13px; }
.customer-order-history-detail h3 { margin: 0 0 8px; color: #25362e; font-size: 12px; letter-spacing: 0; }
.customer-order-history-detail-table { overflow-x: auto; border: 1px solid #dce3e0; }
.customer-order-history-detail-head,
.customer-order-history-detail-row { display: grid; grid-template-columns: minmax(190px, 1.5fr) minmax(92px, .7fr) 64px 110px 118px; align-items: center; min-width: 620px; }
.customer-order-history-detail-head { background: #eef2f0; color: #52635b; font-size: var(--dcats-type-supporting); font-weight: 800; }
.customer-order-history-detail-head span,
.customer-order-history-detail-row > * { min-width: 0; border-right: 1px solid #e1e7e4; padding: 8px 10px; }
.customer-order-history-detail-head span:last-child,
.customer-order-history-detail-row > *:last-child { border-right: 0; }
.customer-order-history-detail-head span:nth-child(n + 3),
.customer-order-history-detail-row > *:nth-child(n + 3) { text-align: right; }
.customer-order-history-detail-row { border-top: 1px solid #e1e7e4; color: #2d3b35; font-size: var(--dcats-type-body); }
.customer-order-history-detail-row > div strong,
.customer-order-history-detail-row > div small { display: block; }
.customer-order-history-detail-row > div small { margin-top: 2px; color: #74817b; font-size: var(--dcats-type-supporting); font-weight: 400; }
.customer-order-history-detail-row.core-charge { background: #fff9ed; }
.customer-order-history-detail-row.core-charge > span:nth-child(2),
.customer-order-history-detail-row.core-charge > strong:last-child { color: #80570d; font-weight: 800; }
.customer-order-history-detail-row.shipping { background: #f5f8fa; }
.customer-order-history-detail-row.shipping > span:nth-child(2),
.customer-order-history-detail-row.shipping > strong:last-child { color: #315c79; font-weight: 800; }
.customer-order-history-detail-totals { display: flex; justify-content: flex-end; border-top: 1px solid #dfe6e2; margin-top: 10px; }
.customer-order-history-detail-totals > div { min-width: 108px; border-left: 1px solid #dfe6e2; padding: 8px 10px; text-align: right; }
.customer-order-history-detail-totals span,
.customer-order-history-detail-totals strong { display: block; }
.customer-order-history-detail-totals span { color: #74817b; font-size: var(--dcats-type-supporting); }
.customer-order-history-detail-totals strong { margin-top: 2px; color: #26352f; font-size: var(--dcats-type-body); }
.customer-order-history-detail-totals .core-charge strong { color: #80570d; }
.customer-order-history-detail-totals .grand-total strong { color: #1b6641; font-size: 14px; }
.customer-order-vehicle-summary { margin-top: 3px; border-top: 1px solid #dbe3df; border-bottom: 1px solid #dbe3df; padding: 9px 0; }
.customer-order-vehicle-summary h4 { margin-bottom: 7px; color: #285e48; font-size: var(--dcats-type-supporting); }
.customer-order-vehicle-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; }
.customer-order-vehicle-summary dl > div { display: grid; grid-template-columns: minmax(62px, auto) minmax(0, 1fr); gap: 6px; }
.customer-order-vehicle-summary dt { color: #74817b; font-size: var(--dcats-type-supporting); }
.customer-order-vehicle-summary dd { min-width: 0; overflow-wrap: anywhere; color: #26352f; font-size: var(--dcats-type-body); font-weight: 800; }
.sales-order-vehicle-information { grid-column: 1 / -1; width: 100%; }

.sales-order-mgmt-body { display: flex; flex: 1; flex-direction: column; min-height: 0; background: #eef1f4; }
.sales-order-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 1px solid #d5dbe1; padding: 20px 24px; background: #fff; }
.sales-order-kicker { color: var(--dcats-brand-red); font-size: 9px; font-weight: 900; }
.sales-order-toolbar h1 { margin-top: 3px; color: #182230; font-size: 22px; letter-spacing: 0; }
.sales-order-toolbar p { margin-top: 5px; color: #667085; font-size: 11px; }
.sales-order-b2-settings-button { min-height: 38px; border: 1px solid #1f65a8; border-radius: 6px; padding: 0 10px; background: #eff6fc; color: #1f65a8; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-b2-settings-button:hover { background: #eff6fc; }
.sales-order-filter-row { position: relative; display: grid; grid-template-columns: auto minmax(320px, 1fr) auto auto; align-items: center; gap: 8px; min-width: 0; }
.sales-order-new-order-button { min-height: 38px; border: 1px solid #287356; border-radius: 6px; padding: 0 13px; background: #287356; color: #fff; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-new-order-button:hover { background: #1f6248; }
.sales-order-new-order-button[hidden] { display: none; }
.sales-order-search-controls { display: grid; grid-template-columns: minmax(210px, 1fr) 150px auto; gap: 6px; min-width: 0; }
.sales-order-selection-controls { display: flex; align-items: center; gap: 6px; min-width: 0; border-left: 1px solid #d8dee4; padding-left: 8px; }
.sales-order-selection-summary { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; min-height: 24px; border: 1px solid #d2d9df; border-radius: 4px; padding: 0 7px; background: #f5f7f9; color: #6e7882; font-size: 9px; font-weight: 800; white-space: nowrap; }
.sales-order-selection-summary.active { border-color: #8eb6d8; background: #edf6fd; color: #245b87; }
.sales-order-secondary-actions { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
.sales-order-data-actions { position: relative; min-width: 0; }
.sales-order-help-link,
.sales-order-data-actions > summary { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid #98a6b3; border-radius: 6px; padding: 0 12px; background: #fff; color: #344054; font-size: 10px; font-weight: 800; list-style: none; white-space: nowrap; cursor: pointer; }
.sales-order-help-link { text-decoration: none; }
.sales-order-help-link[hidden] { display: none; }
.sales-order-filter-row > .sales-order-secondary-actions > .sales-order-help-link { margin-inline-start: auto; }
.fax-help-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.fax-help-heading .sales-order-help-link, .sales-accounting-export-heading-actions .sales-order-help-link, .recycle-actions .sales-order-help-link { min-height: 30px; padding: 0 8px; font-size: 12px; flex: 0 0 auto; }
.shipping-document-help-heading { grid-area: title; }
.finished-shipment-help-heading { margin-bottom: 4px; }
.finished-shipment-help-heading .sales-order-help-link { min-height: 26px; }
.finished-label-card .finished-shipment-help-heading > h3 { margin: 0; }
.sales-accounting-export-heading-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 480px) {
  .recycle-entry-dialog .recycle-header:has(#recycle-fax-order-help:not([hidden])) h2 { margin-top: 0; line-height: 1; white-space: normal; overflow-wrap: anywhere; }
  .recycle-entry-dialog .recycle-actions .sales-order-help-link { min-height: 32px; padding-inline: 4px; }
  .recycle-entry-dialog .recycle-header:has(#recycle-check-result:not([hidden])) .recycle-vehicle-toggle:disabled { display: none; }
}
#sales-accounting-export-overlay:has(#sales-accounting-export-target option[value="yayoi_sales"]:checked) [data-fax-help-section="export"] { display: none; }
.sales-order-help-link:hover { border-color: #426c97; background: #eff6fc; color: #163e68; }
.sales-order-help-link:focus-visible { outline: 2px solid #1d5c9d; outline-offset: 2px; }
.sales-order-data-actions > summary::-webkit-details-marker { display: none; }
.sales-order-data-actions > summary::after { content: "\25BE"; margin-left: 7px; color: #697586; font-size: 9px; }
.sales-order-data-actions[open] > summary { border-color: #287356; background: #eef7f2; color: #1f6248; }
.sales-order-data-actions > div { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; display: grid; gap: 5px; width: 194px; border: 1px solid #cbd3da; border-radius: 6px; box-shadow: 0 10px 24px rgba(28, 39, 50, .16); padding: 7px; background: #fff; }
.sales-order-data-actions > div > button { width: 100%; min-height: 34px; text-align: left; }
.sales-order-filter-row input,
.sales-order-filter-row select { height: 38px; min-width: 0; border: 1px solid #b8c1cc; border-radius: 6px; padding: 0 10px; background: #fff; color: #263241; font-size: 12px; }
.sales-order-accept-button { min-height: 38px; border: 1px solid #b42318; border-radius: 6px; padding: 0 13px; background: #b42318; color: #fff; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-accept-button:hover { background: #941c13; }
.sales-order-accept-button:disabled { border-color: #c8cfd7; background: #e4e7ea; color: #929ba5; cursor: not-allowed; }
.sales-order-batch-message { grid-column: 1 / -1; min-height: 14px; color: #287356; font-size: 10px; font-weight: 800; }
.sales-order-batch-message.error { color: #b42318; }
.sales-order-b2-import-button { min-height: 38px; border: 1px solid #287356; border-radius: 6px; padding: 0 13px; background: #287356; color: #fff; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-b2-import-button:hover { background: #1f6248; }
.sales-order-b2-import-guide-overlay { z-index: 1200; padding: 16px; }
.form-card.sales-order-b2-import-guide-card { width: min(760px, calc(100vw - 24px)); max-width: 760px; max-height: calc(100vh - 32px); border-radius: 8px; padding: 0; overflow: auto; }
.sales-order-b2-import-guide-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d7dfda; padding: 18px 20px 15px; background: #f7faf8; }
.sales-order-b2-import-guide-heading > div > span { color: #287356; font-size: 9px; font-weight: 900; }
.sales-order-b2-import-guide-heading h3 { margin: 3px 0 0; color: #1d2c25; font-size: 20px; letter-spacing: 0; }
.sales-order-b2-import-guide-heading p { max-width: 560px; margin: 5px 0 0; color: #637169; font-size: 10px; line-height: 1.55; }
.sales-order-b2-import-guide-heading > button { flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid #c8d1cc; border-radius: 5px; background: #fff; color: #617068; cursor: pointer; }
.sales-order-b2-import-guide-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 16px 20px 12px; list-style: none; }
.sales-order-b2-import-guide-steps > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-content: start; align-items: start; gap: 8px 9px; min-width: 0; border: 1px solid #d9e1dc; padding: 11px; background: #fff; }
.sales-order-b2-import-guide-steps > li.conditions-open { grid-column: 1 / -1; }
.sales-order-b2-import-guide-steps > li.current { border-color: #287356; background: #f2f8f5; box-shadow: inset 3px 0 0 #287356; }
.sales-order-b2-import-guide-steps > li.complete > span { background: #dcece3; color: #1f6248; }
.sales-order-b2-import-guide-steps > li > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #287356; color: #fff; font-size: 11px; font-weight: 900; }
.sales-order-b2-import-guide-steps strong,
.sales-order-b2-import-guide-steps small { display: block; min-width: 0; }
.sales-order-b2-import-guide-steps strong { color: #26362f; font-size: 11px; line-height: 1.4; }
.sales-order-b2-import-guide-steps small { margin-top: 4px; color: #68766f; font-size: 9px; line-height: 1.55; }
.sales-order-b2-import-guide-field { display: grid; gap: 2px; margin: 8px 0 0; border-left: 3px solid #287356; padding: 6px 8px; background: #eef6f2; }
.sales-order-b2-import-guide-field span { color: #68766f; font-size: 8px; font-weight: 800; }
.sales-order-b2-import-guide-field b { color: #164d38; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.sales-order-b2-import-guide-steps > li > button { grid-column: 2; display: inline-flex; align-items: center; justify-content: center; min-height: 34px; border: 1px solid #287356; border-radius: 5px; padding: 6px 10px; background: #fff; color: #1f6248; font-size: 10px; font-weight: 900; line-height: 1.35; text-align: center; cursor: pointer; }
.sales-order-b2-import-guide-steps > li > button.btn-primary { background: #287356; color: #fff; }
.sales-order-b2-import-guide-steps > li > button:hover { background: #eef7f2; }
.sales-order-b2-import-guide-steps > li > button.btn-primary:hover { background: #1f6248; }
.sales-order-b2-import-guide-steps > li > button:focus-visible,
.sales-order-b2-import-guide-search-conditions:focus-visible,
.sales-order-b2-import-guide-heading > button:focus-visible { outline: 3px solid rgba(40,115,86,.25); outline-offset: 2px; }
.sales-order-b2-import-guide-search-conditions { grid-column: 1 / -1; border-top: 1px solid #cfdad4; padding-top: 9px; }
.sales-order-b2-import-guide-search-conditions[hidden] { display: none; }
.sales-order-b2-import-guide-search-conditions > strong { color: #1f6248; font-size: 10px; }
.sales-order-b2-import-guide-date-range { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 18px; align-items: end; margin-top: 8px; border-left: 3px solid #287356; padding: 10px 11px; background: #eef6f2; }
.sales-order-b2-import-guide-date-range > div:first-child > strong { color: #164d38; font-size: 11px; }
.sales-order-b2-import-guide-date-range > div:first-child > small { margin-top: 2px; color: #52675e; font-size: 9px; }
.sales-order-b2-import-guide-date-fields { display: grid; grid-template-columns: minmax(135px, 1fr) auto minmax(135px, 1fr); align-items: end; gap: 7px; }
.sales-order-b2-import-guide-date-fields > span { padding-bottom: 10px; color: #5c6d65; font-size: 11px; }
.sales-order-b2-import-guide-date-fields label { min-width: 0; }
.sales-order-b2-import-guide-date-fields label > span { display: block; margin-bottom: 3px; color: #405049; font-size: 8px; font-weight: 900; }
.sales-order-b2-import-guide-date-fields input { width: 100%; min-width: 0; height: 36px; border: 1px solid #8da99b; border-radius: 4px; padding: 0 8px; background: #fff; color: #1d2c25; font-size: 11px; font-weight: 800; }
.sales-order-b2-import-guide-date-fields input:focus { border-color: #287356; outline: 3px solid rgba(40,115,86,.18); }
.sales-order-b2-import-guide-date-range > p { grid-column: 1 / -1; margin: 0; color: #40584d; font-size: 9px; line-height: 1.5; }
.sales-order-b2-import-guide-search-conditions dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 7px 0 0; border: 1px solid #d7dfda; background: #fff; }
.sales-order-b2-import-guide-search-conditions dl > div { min-width: 0; border-right: 1px solid #d7dfda; padding: 7px 8px; }
.sales-order-b2-import-guide-search-conditions dl > div:last-child { border-right: 0; }
.sales-order-b2-import-guide-search-conditions dt { color: #405049; font-size: 8px; font-weight: 900; line-height: 1.4; }
.sales-order-b2-import-guide-search-conditions dd { margin: 3px 0 0; color: #23342c; font-size: 9px; font-weight: 800; line-height: 1.45; }
.sales-order-b2-import-guide-no-filter { display: grid; gap: 2px; margin: 7px 0 0; border-left: 3px solid #7a93aa; padding: 7px 9px; background: #f4f7fa; }
.sales-order-b2-import-guide-no-filter strong { color: #334d62; font-size: 9px; }
.sales-order-b2-import-guide-no-filter span { color: #526473; font-size: 9px; line-height: 1.5; }
.sales-order-b2-import-guide-export-steps { margin-top: 8px; }
.sales-order-b2-import-guide-export-steps > strong { color: #405049; font-size: 9px; }
.sales-order-b2-import-guide-export-steps ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 18px; margin: 5px 0 0; padding-left: 18px; }
.sales-order-b2-import-guide-export-steps li { color: #526159; font-size: 9px; line-height: 1.45; }
.sales-order-b2-import-guide-export-steps li b,
.sales-order-b2-import-guide-export-steps li span { display: block; }
.sales-order-b2-import-guide-export-steps li b { color: #1d2c25; font-size: 9px; }
.sales-order-b2-import-guide-settings-reference { margin: 0 20px 12px; border-top: 1px solid #cfdad4; border-bottom: 1px solid #cfdad4; padding: 12px 0; background: #f7faf8; }
.sales-order-b2-import-guide-settings-reference-heading { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; padding: 0 12px 10px; }
.sales-order-b2-import-guide-settings-reference-heading > span { color: #287356; font-size: 8px; font-weight: 900; line-height: 1.4; }
.sales-order-b2-import-guide-settings-reference-heading h4 { margin: 0; color: #1d2c25; font-size: 13px; letter-spacing: 0; }
.sales-order-b2-import-guide-settings-reference-heading p { margin: 3px 0 0; color: #637169; font-size: 9px; line-height: 1.5; }
.sales-order-b2-import-guide-settings-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #d7dfda; border-bottom: 1px solid #d7dfda; background: #fff; }
.sales-order-b2-import-guide-settings-group { min-width: 0; }
.sales-order-b2-import-guide-settings-group + .sales-order-b2-import-guide-settings-group { border-left: 1px solid #d7dfda; }
.sales-order-b2-import-guide-settings-group h5 { margin: 0; border-bottom: 1px solid #d7dfda; padding: 7px 10px; background: #edf3f0; color: #234f3d; font-size: 10px; letter-spacing: 0; }
.sales-order-b2-import-guide-settings-group dl { margin: 0; }
.sales-order-b2-import-guide-settings-group dl > div { display: grid; grid-template-columns: minmax(92px, .8fr) minmax(0, 1.2fr); min-height: 31px; border-bottom: 1px solid #e5eae7; }
.sales-order-b2-import-guide-settings-group dl > div:last-child { border-bottom: 0; }
.sales-order-b2-import-guide-settings-group dt,
.sales-order-b2-import-guide-settings-group dd { display: flex; align-items: center; min-width: 0; margin: 0; padding: 6px 8px; font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.sales-order-b2-import-guide-settings-group dt { background: #f8faf9; color: #526159; font-weight: 800; }
.sales-order-b2-import-guide-settings-group dd { color: #1d2c25; font-weight: 800; }
.sales-order-b2-import-guide-printer-note { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; margin: 9px 12px 0; border-left: 3px solid #c24736; padding: 7px 9px; background: #fff4f1; color: #7f2f25; font-size: 9px; line-height: 1.45; }
.sales-order-b2-import-guide-printer-note strong { color: #6f281f; }
.sales-order-b2-import-guide-status { min-height: 34px; margin: 0 20px 10px; border-left: 3px solid #287356; padding: 8px 10px; background: #f2f8f5; color: #234f3d; font-size: 10px; font-weight: 800; line-height: 1.5; }
.sales-order-b2-import-guide-status.error { border-left-color: #b42318; background: #fff3f1; color: #8f2119; }
.sales-order-b2-import-guide-help { margin: 0 20px 10px; border: 1px solid #d9e1dc; background: #fff; }
.sales-order-b2-import-guide-help summary { padding: 8px 10px; color: #36473f; font-size: 10px; font-weight: 900; cursor: pointer; }
.sales-order-b2-import-guide-help dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid #e2e8e4; }
.sales-order-b2-import-guide-help dl > div { min-width: 0; padding: 8px 10px; border-right: 1px solid #e2e8e4; border-bottom: 1px solid #e2e8e4; }
.sales-order-b2-import-guide-help dl > div:nth-child(2n) { border-right: 0; }
.sales-order-b2-import-guide-help dt { color: #34453d; font-size: 9px; font-weight: 900; }
.sales-order-b2-import-guide-help dd { margin: 3px 0 0; color: #68766f; font-size: 9px; line-height: 1.5; }
.sales-order-b2-import-guide-warning { margin: 0 20px 8px; border-left: 3px solid #c98518; padding: 7px 9px; background: #fff8e8; color: #77520f; font-size: 9px; font-weight: 700; line-height: 1.5; }
.sales-order-b2-import-guide-security { margin: 0 20px; border-left: 3px solid #7a93aa; padding: 7px 9px; background: #f4f7fa; color: #526473; font-size: 9px; line-height: 1.5; }
.sales-order-b2-import-guide-card .form-footer { margin: 12px 0 0; padding: 12px 20px; }
.sales-order-accounting-button { min-height: 38px; border: 1px solid #6b4f1d; border-radius: 6px; padding: 0 13px; background: #fffaf0; color: #694b12; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-accounting-button:hover { background: #fff3d6; }
.sales-order-business-workspace-button { min-height: 38px; border: 1px solid #287356; border-radius: 6px; padding: 0 13px; background: #fff; color: #1f6248; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-business-workspace-button:hover { background: #eef7f2; }
.sales-order-b2-preflight { position: relative; display: grid; grid-template-columns: minmax(180px, .45fr) minmax(0, 1.55fr) 30px; gap: 18px; border-bottom: 1px solid #e4b7b2; padding: 14px 24px; background: #fff8f7; }
.sales-order-b2-preflight[hidden] { display: none; }
.sales-order-b2-preflight > div:first-child > span { color: #b42318; font-size: 9px; font-weight: 900; }
.sales-order-b2-preflight h2 { margin-top: 2px; color: #641b16; font-size: 15px; letter-spacing: 0; }
.sales-order-b2-preflight p { margin-top: 4px; color: #80524e; font-size: 9px; line-height: 1.5; }
.sales-order-b2-preflight-errors { display: grid; gap: 6px; }
.sales-order-b2-preflight-error { border-left: 3px solid #d0443b; padding: 7px 10px; background: #fff; color: #6b2924; font-size: 10px; line-height: 1.45; }
.sales-order-b2-preflight-error strong { display: block; margin-bottom: 2px; color: #4d1713; font-size: 11px; }
.sales-order-b2-preflight-close { width: 30px; height: 30px; border: 1px solid #d9aaa5; border-radius: 5px; background: #fff; color: #8f3b34; cursor: pointer; }
.sales-order-b2-import { border-bottom: 1px solid #cfd8d3; padding: 18px 24px; background: #f7faf8; }
.sales-order-b2-import[hidden] { display: none; }
.sales-order-b2-import-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.sales-order-b2-import-head span { color: #287356; font-size: 9px; font-weight: 900; }
.sales-order-b2-import-head h2 { margin-top: 2px; color: #1d2c25; font-size: 17px; letter-spacing: 0; }
.sales-order-b2-import-head p { margin-top: 4px; color: #64736c; font-size: 10px; }
.sales-order-b2-import-close { width: 30px; height: 30px; border: 1px solid #c8d1cc; border-radius: 5px; background: #fff; color: #617068; cursor: pointer; }
.sales-order-b2-import-table { max-height: 300px; overflow: auto; border: 1px solid #d3dcd7; background: #fff; }
.sales-order-b2-import-row { display: grid; grid-template-columns: 42px minmax(190px, 1.2fr) 82px 118px minmax(125px, .8fr) minmax(180px, 1fr); align-items: center; gap: 10px; min-width: 850px; border-bottom: 1px solid #e4e9e6; padding: 9px 10px; color: #34433c; font-size: 10px; }
.sales-order-b2-import-row:last-child { border-bottom: 0; }
.sales-order-b2-import-row.head { position: sticky; top: 0; z-index: 1; min-height: 34px; background: #edf2ef; color: #617068; font-size: 9px; font-weight: 800; }
.sales-order-b2-import-row.ready { box-shadow: inset 3px 0 0 #2b8a57; background: #f8fcfa; }
.sales-order-b2-import-row.duplicate { box-shadow: inset 3px 0 0 #88939d; background: #fafbfb; }
.sales-order-b2-import-row.invalid,
.sales-order-b2-import-row.not_found,
.sales-order-b2-import-row.conflict { box-shadow: inset 3px 0 0 #c94840; background: #fff8f7; }
.sales-order-b2-import-row strong,
.sales-order-b2-import-row small { display: block; min-width: 0; overflow-wrap: anywhere; }
.sales-order-b2-import-row small { margin-top: 2px; color: #748078; font-size: 9px; }
.sales-order-b2-import-row .tracking { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 800; letter-spacing: 0; }
.sales-order-b2-import-row em { display: inline-block; border-radius: 3px; padding: 2px 5px; background: #eaf6ef; color: #236444; font-size: 9px; font-style: normal; font-weight: 800; }
.sales-order-b2-import-row:not(.ready) em { background: #f1f2f3; color: #59636b; }
.sales-order-b2-import-row.invalid em,
.sales-order-b2-import-row.not_found em,
.sales-order-b2-import-row.conflict em { background: #fff0ee; color: #a9322a; }
.sales-order-b2-import-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.sales-order-b2-import-actions > span { flex: 1; color: #496057; font-size: 10px; font-weight: 700; }
.sales-order-b2-import-actions > span.error { color: #b42318; }
.sales-order-b2-import-cancel,
.sales-order-b2-import-confirm { min-height: 36px; border-radius: 6px; padding: 0 14px; font-size: 11px; font-weight: 800; cursor: pointer; }
.sales-order-b2-import-cancel { border: 1px solid #a8b3ad; background: #fff; color: #44554d; }
.sales-order-b2-import-confirm { border: 1px solid #287356; background: #287356; color: #fff; }
.sales-order-b2-import-confirm:disabled { border-color: #cbd3cf; background: #dfe4e2; color: #87918c; cursor: not-allowed; }
@media (max-width: 560px) {
  .sales-order-b2-import-guide-overlay { align-items: flex-start; padding: 8px; }
  .form-card.sales-order-b2-import-guide-card { width: calc(100vw - 16px); max-height: calc(100vh - 16px); margin: 0; }
  .sales-order-b2-import-guide-heading { gap: 10px; padding: 14px 14px 12px; }
  .sales-order-b2-import-guide-heading h3 { font-size: 17px; }
  .sales-order-b2-import-guide-steps { grid-template-columns: 1fr; gap: 6px; padding: 12px 14px 10px; }
  .sales-order-b2-import-guide-steps > li { padding: 9px; }
  .sales-order-b2-import-guide-steps > li > button { width: 100%; min-height: 42px; }
  .sales-order-b2-import-guide-date-range { grid-template-columns: 1fr; }
  .sales-order-b2-import-guide-date-fields { grid-template-columns: 1fr; }
  .sales-order-b2-import-guide-date-fields > span { display: none; }
  .sales-order-b2-import-guide-search-conditions dl { grid-template-columns: 1fr; }
  .sales-order-b2-import-guide-search-conditions dl > div { border-right: 0; border-bottom: 1px solid #d7dfda; }
  .sales-order-b2-import-guide-search-conditions dl > div:last-child { border-bottom: 0; }
  .sales-order-b2-import-guide-export-steps ol { grid-template-columns: 1fr; }
  .sales-order-b2-import-guide-settings-reference { margin: 0 14px 10px; }
  .sales-order-b2-import-guide-settings-reference-heading { grid-template-columns: 1fr; gap: 3px; padding: 0 9px 9px; }
  .sales-order-b2-import-guide-settings-groups { grid-template-columns: 1fr; }
  .sales-order-b2-import-guide-settings-group + .sales-order-b2-import-guide-settings-group { border-top: 1px solid #cfdad4; border-left: 0; }
  .sales-order-b2-import-guide-settings-group dl > div { grid-template-columns: minmax(105px, .85fr) minmax(0, 1.15fr); }
  .sales-order-b2-import-guide-printer-note { grid-template-columns: 1fr; gap: 2px; margin: 8px 9px 0; }
  .sales-order-b2-import-guide-status,
  .sales-order-b2-import-guide-help,
  .sales-order-b2-import-guide-warning,
  .sales-order-b2-import-guide-security { margin: 0 14px; }
  .sales-order-b2-import-guide-help dl { grid-template-columns: 1fr; }
  .sales-order-b2-import-guide-help dl > div { border-right: 0; }
  .sales-order-b2-import-guide-card .form-footer { margin-top: 10px; padding: 10px 14px; }
  .sales-order-b2-import-guide-card .form-footer button { width: 100%; }
}
.sales-order-auto-print { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 12px; min-height: 48px; border-bottom: 1px solid #cfd8d3; padding: 7px 24px; background: #f7faf8; }
.sales-order-auto-print-heading { display: flex; align-items: center; gap: 9px; }
.sales-order-auto-print-heading > strong { color: #25352e; font-size: 13px; letter-spacing: 0; }
.sales-order-auto-print-scope { grid-column: 1 / -1; min-width: 0; color: #66736d; font-size: 9px; line-height: 1.35; }
.sales-order-auto-print-state { display: inline-flex; align-items: center; justify-content: center; min-height: 21px; border: 1px solid #adb8b2; border-radius: 4px; padding: 0 7px; background: #f1f3f2; color: #5d6963; font-size: 9px; font-weight: 900; white-space: nowrap; }
.sales-order-auto-print-state.ready { border-color: #79b48f; background: #edf8f2; color: #236444; }
.sales-order-auto-print-state.error { border-color: #dc918b; background: #fff2f0; color: #a42d25; }
.sales-order-auto-print-state.stopped { border-color: #d6b36c; background: #fff8e8; color: #76570f; }
.sales-order-auto-print-controls { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: end; gap: 9px; border-bottom: 1px solid #d8dfdb; padding: 16px 20px; }
.sales-order-auto-print-controls label > span { display: block; margin-bottom: 4px; color: #65726b; font-size: 9px; font-weight: 800; }
.sales-order-auto-print-controls select { width: 100%; height: 34px; border: 1px solid #b8c4be; border-radius: 5px; padding: 0 8px; background: #fff; color: #2c3b34; font-size: 10px; }
.sales-order-auto-print-toggle { display: flex; align-items: center; min-height: 34px; gap: 6px; border: 1px solid #ccd5d0; border-radius: 5px; padding: 0 9px; background: #fff; color: #35463e; font-size: 10px; font-weight: 800; white-space: nowrap; }
.sales-order-auto-print-toggle input { width: 15px; height: 15px; accent-color: #287356; }
.sales-order-auto-print-controls .btn-primary { min-height: 34px; border-radius: 5px; padding: 0 12px; font-size: 10px; white-space: nowrap; }
.sales-order-print-settings-button { min-height: 34px; border: 1px solid #287356; border-radius: 5px; padding: 0 12px; background: #fff; color: #287356; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-print-settings-button:hover { background: #eef7f2; }
.sales-order-dashboard { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; border-bottom: 1px solid #d5dbe1; padding: 8px 24px; background: #fff; }
.sales-order-dashboard-heading { min-width: 120px; }
.sales-order-dashboard-heading strong,
.sales-order-dashboard-heading span { display: block; }
.sales-order-dashboard-heading strong { color: #26352f; font-size: 12px; }
.sales-order-dashboard-heading span { margin-top: 2px; color: #74817b; font-size: 9px; line-height: 1.4; }
.sales-order-dashboard.error .sales-order-dashboard-heading span { color: #b42318; }
.sales-order-dashboard-metrics { display: grid; grid-template-columns: repeat(8, minmax(84px, 1fr)); gap: 6px; min-width: 0; }
.sales-order-dashboard-metric { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 46px; border: 1px solid #d5dce2; border-left-width: 3px; border-radius: 5px; padding: 6px 9px; background: #f8fafb; color: #43505c; cursor: pointer; text-align: left; }
.sales-order-dashboard-metric:hover { border-color: #9dacb8; background: #fff; }
.sales-order-dashboard-metric:focus-visible { outline: 3px solid rgba(37,99,199,.25); outline-offset: 1px; }
.sales-order-dashboard-metric span { min-width: 0; overflow: hidden; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.sales-order-dashboard-metric strong { flex: 0 0 auto; color: #24303c; font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1; }
.sales-order-dashboard-metric.all,
.sales-order-dashboard-metric.work-queue { border-left-color: #778493; }
.sales-order-dashboard-metric.submitted { border-left-color: #d59b36; }
.sales-order-dashboard-metric.accepted { border-left-color: #4e8dbd; }
.sales-order-dashboard-metric.shipping-ready { border-left-color: #346c9a; }
.sales-order-dashboard-metric.shipped { border-left-color: #3c9260; }
.sales-order-dashboard-metric.sales-pending { border-left-color: #c18422; }
.sales-order-dashboard-metric.sales-registered { border-left-color: #287356; }
.sales-order-dashboard-metric.completed { border-left-color: #668173; }
.sales-order-dashboard-metric.cancelled { border-left-color: #bf6262; }
.sales-order-dashboard-metric.active { border-color: #287356; box-shadow: inset 0 0 0 1px #287356; background: #eef7f2; color: #1f6248; }
.sales-order-dashboard.loading .sales-order-dashboard-metric { cursor: progress; }
.sales-order-auto-print-controls :disabled { cursor: not-allowed; opacity: .62; }
.sales-order-auto-print-message { min-height: 18px; padding: 9px 20px; color: #456057; font-size: 9px; font-weight: 700; }
.sales-order-auto-print-message.error { color: #b42318; }
.form-card.sales-order-print-settings-card { width: min(680px, calc(100vw - 24px)); max-width: 680px; border-radius: 8px; padding: 0; overflow: hidden; }
.sales-order-print-settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d8dfdb; padding: 18px 20px 14px; }
.sales-order-print-settings-heading span { color: #287356; font-size: 9px; font-weight: 900; }
.sales-order-print-settings-heading h3 { margin: 2px 0 0; color: #1d2c25; font-size: 18px; letter-spacing: 0; }
.sales-order-print-settings-heading p { margin-top: 5px; color: #68766f; font-size: 9px; line-height: 1.5; }
.sales-order-print-settings-heading button { width: 30px; height: 30px; border: 1px solid #c8d1cc; border-radius: 5px; background: #fff; color: #617068; cursor: pointer; }
.sales-order-print-settings-current { display: grid; grid-template-columns: 1.2fr 1.4fr .7fr; border-bottom: 1px solid #d8dfdb; background: #f7faf8; }
.sales-order-print-settings-current > div { min-width: 0; border-right: 1px solid #d8dfdb; padding: 14px 16px; }
.sales-order-print-settings-current > div:last-child { border-right: 0; }
.sales-order-print-settings-current span,
.sales-order-print-settings-current strong { display: block; overflow-wrap: anywhere; }
.sales-order-print-settings-current span { color: #718078; font-size: 9px; font-weight: 800; }
.sales-order-print-settings-current strong { margin-top: 4px; color: #27372f; font-size: 12px; }
.sales-order-print-settings-current strong.ready { color: #236444; }
.sales-order-print-settings-current strong.stopped { color: #76570f; }
.sales-order-print-settings-current strong.error { color: #a42d25; }
.sales-order-print-settings-message { min-height: 18px; padding: 0 20px 10px; color: #496057; font-size: 10px; font-weight: 700; }
.sales-order-print-settings-card .form-footer { margin-top: 0; padding: 14px 20px; }
.form-card.sales-order-b2-settings-card { width: min(720px, calc(100vw - 24px)); max-width: 720px; border-radius: 8px; padding: 0; overflow: hidden; }
.sales-order-b2-settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d6dfe7; padding: 18px 20px 14px; }
.sales-order-b2-settings-heading span { color: #1f65a8; font-size: 9px; font-weight: 900; }
.sales-order-b2-settings-heading h3 { margin: 2px 0 0; color: #182a3d; font-size: 19px; letter-spacing: 0; }
.sales-order-b2-settings-heading p { margin-top: 5px; color: #687787; font-size: 9px; line-height: 1.5; }
.sales-order-b2-settings-heading button { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid #c4d0dc; border-radius: 5px; background: #fff; color: #52677b; cursor: pointer; }
.sales-order-b2-settings-status { min-height: 34px; border-bottom: 1px solid #dce4eb; padding: 10px 20px; background: #f5f9fc; color: #48657d; font-size: 10px; font-weight: 800; }
.sales-order-b2-settings-status.ready { background: #eff8f3; color: #236444; }
.sales-order-b2-settings-status.missing { background: #fff7e8; color: #77550d; }
.sales-order-b2-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 18px 20px 12px; }
.sales-order-b2-settings-grid label { min-width: 0; }
.sales-order-b2-settings-grid label.wide { grid-column: 1 / -1; }
.sales-order-b2-settings-grid label > span { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; color: #536574; font-size: 10px; font-weight: 800; }
.sales-order-b2-settings-grid label b { border: 1px solid #e7aaa5; border-radius: 3px; padding: 1px 4px; color: #b42318; font-size: 8px; }
.sales-order-b2-settings-grid input { width: 100%; height: 36px; border: 1px solid #b8c7d5; border-radius: 5px; padding: 0 10px; background: #fff; color: #1f3041; font-size: 11px; }
.sales-order-b2-settings-grid input:focus { border-color: #1f65a8; outline: 3px solid rgba(31,101,168,.14); }
.sales-order-b2-settings-help { margin: 0 20px 10px; border-left: 3px solid #76a4cf; padding: 8px 10px; background: #f5f9fc; color: #5e7182; font-size: 9px; line-height: 1.5; }
.sales-order-b2-settings-message { min-height: 20px; padding: 0 20px 12px; color: #236444; font-size: 10px; font-weight: 800; }
.sales-order-b2-settings-message.error { color: #b42318; }
.sales-order-b2-settings-card .form-footer { margin-top: 0; padding: 14px 20px; }
.sales-order-b2-settings-card.busy { cursor: progress; }
.sales-order-b2-settings-card.busy input,
.sales-order-b2-settings-card.busy button { pointer-events: none; opacity: .68; }
.form-card.dcats-business-workspace-card { width: min(560px, calc(100vw - 24px)); max-width: 560px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 8px; padding: 0; overflow-y: auto; }
.dcats-business-workspace-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d8dfdb; padding: 18px 20px 14px; }
.dcats-business-workspace-heading span { color: #287356; font-size: 9px; font-weight: 900; }
.dcats-business-workspace-heading h3 { margin: 2px 0 0; color: #1d2c25; font-size: 19px; letter-spacing: 0; }
.dcats-business-workspace-heading button { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid #c8d1cc; border-radius: 5px; background: #fff; color: #617068; cursor: pointer; }
.dcats-business-workspace-location { display: grid; gap: 4px; margin: 18px 20px 12px; border-left: 4px solid #287356; padding: 11px 13px; background: #f3f8f5; }
.dcats-business-workspace-location span { color: #68766f; font-size: 9px; font-weight: 800; }
.dcats-business-workspace-location strong { color: #1d2c25; font-size: 15px; }
.dcats-business-workspace-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; padding: 0 20px 16px; }
.dcats-business-workspace-actions a,
.dcats-business-workspace-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 5px; font-size: 11px; font-weight: 800; text-decoration: none; }
.dcats-business-workspace-actions a { border: 1px solid #287356; background: #fff; color: #1f6248; }
.dcats-business-workspace-actions a:hover { background: #eef7f2; }
.dcats-business-workspace-actions button:disabled { cursor: wait; opacity: .65; }
.dcats-business-workspace-shortcut-hint { margin: 0 20px 16px; color: #58685f; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.dcats-business-workspace-drive-support { margin: 0 20px 16px; border: 1px solid #cbd8d1; border-radius: 6px; background: #f7faf8; color: #263d30; }
.dcats-business-workspace-drive-support summary { padding: 12px; color: #1f6248; font-size: 12px; font-weight: 800; cursor: pointer; }
.dcats-business-workspace-drive-support summary:focus-visible { outline: 2px solid #287356; outline-offset: -3px; border-radius: 5px; }
.dcats-business-workspace-drive-support-body { padding: 0 13px 13px; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.dcats-business-workspace-drive-support-body p { margin: 4px 0 9px; }
.dcats-business-workspace-drive-support-body ol { margin: 12px 0; padding-left: 21px; }
.dcats-business-workspace-drive-support-body li + li { margin-top: 14px; }
.dcats-business-workspace-drive-support-body a { color: #1f6248; text-decoration: underline; text-underline-offset: 2px; }
.dcats-business-workspace-drive-support-body h4 { margin: 18px 0 9px; font-size: 13px; }
.dcats-business-workspace-drive-support-body dl { margin: 0; }
.dcats-business-workspace-drive-support-body dt { margin-top: 12px; font-weight: 800; }
.dcats-business-workspace-drive-support-body dd { margin: 3px 0 0; }
.dcats-business-workspace-b2 { display: grid; gap: 14px; margin: 24px 20px 16px; border: 1px solid #cbd8d1; border-radius: 6px; padding: 16px; background: #fff; }
.dcats-business-workspace-account { margin: 20px; padding: 16px; border: 1px solid #cbd8d1; border-left: 4px solid #287356; border-radius: 6px; background: #f7faf8; }
.dcats-business-workspace-account[hidden] { display: none; }
.dcats-business-workspace-company { margin: 20px; padding: 16px; border: 1px solid #cbd8d1; border-radius: 6px; background: #fff; color: #1d2c25; }
.dcats-business-workspace-company[hidden] { display: none; }
.dcats-business-workspace-company h4 { margin: 0 0 8px; font-size: 14px; }
.dcats-business-workspace-company p { font-size: 12px; line-height: 1.7; }
.dcats-business-workspace-company-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dcats-business-workspace-company button { min-height: 44px; border: 1px solid #287356; border-radius: 5px; padding: 8px 12px; background: #fff; color: #1f6248; font-size: 12px; font-weight: 700; white-space: normal; cursor: pointer; }
.dcats-business-workspace-company button:disabled { opacity: .55; cursor: default; }
.dcats-business-workspace-company button:focus-visible { outline: 2px solid #287356; outline-offset: 3px; }
.dcats-business-workspace-company-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e1e6e3; }
.dcats-business-workspace-company-row h5 { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.dcats-company-csv-label { grid-column: 1 / -1; display: grid; gap: 6px; font-size: 12px; }
.dcats-company-csv-label input { width: 100%; min-width: 0; font-size: 12px; }
.dcats-business-workspace-company-row [data-company-backup], [data-company-backup-result], [data-company-import-result] { grid-column: 1 / -1; }
.dcats-business-workspace-company-row [role="status"], #dcats-business-workspace-company-status { grid-column: 1 / -1; margin-top: 6px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.dcats-business-workspace-company .error { color: #b42318; }
.dcats-business-workspace-company .ready { color: #176b43; }
.dcats-business-workspace-company .dcats-business-workspace-company-note { color: #66756c; font-size: 11px; }
@media (max-width: 480px) { .dcats-business-workspace-company-row { grid-template-columns: 1fr; } .dcats-business-workspace-company-actions button { width: 100%; } }
.dcats-business-workspace-backup { margin: 20px 0; padding: 16px; border: 1px solid #c8d8d0; border-left: 4px solid #287356; border-radius: 6px; background: #f6faf8; }
.dcats-business-workspace-backup h4 { margin: 0 0 8px; font-size: 14px; color: #1d2c25; }
.dcats-extension-manager code { display: inline-block; max-width: 100%; color: #173c2a; font-size: 12px; overflow-wrap: anywhere; user-select: all; }
.dcats-extension-manager ol { padding-left: 24px; font-size: 12px; line-height: 1.8; }
.dcats-extension-manager li + li { margin-top: 8px; }
.dcats-integration-banner { display: flex; gap: 20px; justify-content: space-between; margin-bottom: 22px; padding: 16px 20px; border: 1px solid #d5ddce; border-left: 4px solid #91712d; border-radius: 7px; background: #fffaf0; }
.dcats-integration-banner[hidden], .dcats-integration-notice[hidden], .dcats-integration-check[hidden] { display: none; }
.dcats-integration-banner h3 { margin: 0 0 8px; font-size: 15px; }
.dcats-integration-banner p, .dcats-integration-notice p { margin: 6px 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.dcats-integration-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.dcats-integration-banner button, .dcats-integration-notice button, .dcats-integration-check-list button { min-height: 36px; padding: 7px 10px; border: 1px solid #287356; border-radius: 4px; color: #176b43; background: #fff; font-size: 12px; cursor: pointer; }
.dcats-integration-notice { margin: 16px 20px; padding: 12px; border: 1px solid #d5b36c; border-radius: 5px; background: #fffaf0; }
.dcats-integration-check-list { margin: 10px 0; }
.dcats-integration-check-list > div { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #dce5e0; font-size: 12px; }
.dcats-integration-check-list dd { margin: 0; }
.dcats-integration-banner button:focus-visible, .dcats-integration-check-list button:focus-visible, .dcats-integration-notice button:focus-visible { outline: 2px solid #287356; outline-offset: 3px; }
@media (max-width: 600px) { .dcats-integration-banner { flex-direction: column; gap: 10px; padding: 14px; } .dcats-integration-check-list > div { grid-template-columns: minmax(0,1fr) auto; } .dcats-integration-check-list button { grid-column: 1 / -1; width: 100%; } }
.dcats-business-workspace-backup p { margin: 6px 0; font-size: 12px; line-height: 1.7; color: #46594d; }
.dcats-business-workspace-backup > button { width: 100%; min-height: 44px; margin: 10px 0; padding: 10px; border: 1px solid #287356; border-radius: 5px; color: #176b43; background: #fff; font-size: 12px; white-space: normal; }
.dcats-business-workspace-backup > button:disabled { opacity: .65; cursor: wait; }
#dcats-business-workspace-backup-setup { background: #176b43; color: #fff; }
.dcats-business-workspace-backup button:focus-visible, .dcats-business-workspace-backup summary:focus-visible { outline: 2px solid #287356; outline-offset: 3px; }
.dcats-business-workspace-backup-checks { margin: 12px 0; font-size: 12px; }
.dcats-business-workspace-backup-checks > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, auto); gap: 12px; padding: 8px 0; border-bottom: 1px solid #dce5e0; }
.dcats-business-workspace-backup-checks dt, .dcats-business-workspace-backup-checks dd { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.dcats-business-workspace-backup-checks dd { text-align: right; font-weight: 600; }
.dcats-business-workspace-backup-help { padding: 10px; border: 1px solid #c8d8d0; border-radius: 4px; background: #fff; }
.dcats-business-workspace-backup-help summary { cursor: pointer; color: #176b43; font-size: 12px; font-weight: 600; }
.dcats-business-workspace-backup .dcats-business-workspace-backup-note { font-size: 11px; color: #66756c; }
.dcats-business-workspace-backup-first-setup { margin: 12px 0; padding: 12px; border: 1px solid #c8d8d0; border-radius: 5px; background: #fff; }
.dcats-business-workspace-backup-first-setup a { display: block; min-height: 44px; padding: 10px; box-sizing: border-box; border: 1px solid #287356; border-radius: 5px; color: #176b43; font-size: 12px; line-height: 1.7; text-align: center; overflow-wrap: anywhere; }
.dcats-business-workspace-backup-first-setup a:focus-visible { outline: 2px solid #287356; outline-offset: 3px; }
#dcats-business-workspace-backup-status { font-size: 12px; line-height: 1.7; }
.dcats-business-workspace-backup .ready { color: #176b43; }
.dcats-business-workspace-backup .pending { color: #875400; }
.dcats-business-workspace-backup .error { color: #b42318; }
.dcats-business-workspace-account h4 { margin: 0 0 8px; color: #1d2c25; font-size: 14px; }
.dcats-business-workspace-account p { margin: 5px 0; color: #46594d; font-size: 12px; line-height: 1.7; }
.dcats-business-workspace-account button { width: 100%; margin: 12px 0 6px; min-height: 44px; border-radius: 5px; padding: 10px 14px; font-size: 12px; white-space: normal; }
.dcats-business-workspace-account button:focus-visible { outline: 2px solid #287356; outline-offset: 3px; }
.dcats-business-workspace-account button:disabled { opacity: .65; cursor: wait; }
.dcats-business-workspace-account .dcats-business-workspace-account-note { color: #66756c; font-size: 11px; }
#dcats-business-workspace-account-status { margin-top: 8px; color: #46594d; font-size: 12px; line-height: 1.7; }
#dcats-business-workspace-account-status:empty { display: none; }
#dcats-business-workspace-account-status.ready { color: #176b43; }
#dcats-business-workspace-account-status.error { color: #b42318; }
.dcats-business-workspace-b2-copy { display: grid; min-width: 0; gap: 3px; }
.dcats-business-workspace-b2-copy h4 { margin: 0 0 3px; color: #1d2c25; font-size: 14px; font-weight: 800; }
.dcats-business-workspace-b2-copy strong { margin-top: 7px; border-radius: 4px; padding: 8px 10px; background: #f3f6f4; color: #1d2c25; font-size: 12px; overflow-wrap: anywhere; }
.dcats-business-workspace-b2-copy p { margin: 2px 0 0; color: #58685f; font-size: 11px; line-height: 1.6; }
.dcats-business-workspace-b2-copy .dcats-business-workspace-b2-picker-note { margin-top: 6px; color: #58685f; font-size: 10px; }
.dcats-business-workspace-b2-target { display: grid; min-width: 0; gap: 4px; margin-top: 8px; color: #58685f; font-size: 10px; line-height: 1.6; }
.dcats-business-workspace-b2-target code { color: #344b3f; font-size: 10px; overflow-wrap: anywhere; }
.dcats-business-workspace-b2-warning { border-left: 3px solid #b7791f; border-radius: 3px; padding: 10px 12px; background: #fff8e8; color: #765000; font-size: 11px; line-height: 1.6; }
.dcats-business-workspace-b2-warning strong { font-weight: 800; }
.dcats-business-workspace-b2-warning p { margin: 3px 0 0; }
.dcats-business-workspace-b2-permission-hint { margin: -4px 0 0; color: #58685f; font-size: 11px; line-height: 1.6; }
.dcats-business-workspace-b2-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e1e6e3; padding-top: 12px; }
.dcats-business-workspace-b2-status { display: grid; min-width: 0; gap: 4px; }
.dcats-business-workspace-b2-state { color: #8a5b00; font-size: 10px; font-weight: 900; }
.dcats-business-workspace-b2-state.ready { color: #176b43; }
.dcats-business-workspace-b2-state.error { color: #b42318; }
.dcats-business-workspace-b2-directory { color: #68766f; font-size: 10px; overflow-wrap: anywhere; }
.dcats-business-workspace-b2-directory:empty { display: none; }
.dcats-business-workspace-b2-control button { flex: 0 0 auto; min-height: 40px; max-width: 100%; border: 1px solid #287356; border-radius: 5px; padding: 8px 12px; background: #fff; color: #1f6248; font-size: 11px; font-weight: 800; cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
.dcats-business-workspace-b2-control button:hover { background: #eef7f2; }
.dcats-business-workspace-b2-control button:focus-visible { outline: 2px solid #287356; outline-offset: 3px; }
.dcats-business-workspace-b2-control button:disabled { cursor: default; opacity: .65; }
.dcats-business-workspace-message { min-height: 32px; border-top: 1px solid #e1e6e3; padding: 9px 20px; color: #22643e; font-size: 10px; font-weight: 700; line-height: 1.45; }
.dcats-business-workspace-message.error { color: #b42318; }
.dcats-business-workspace-card .form-footer { margin-top: 0; padding: 12px 20px; }
@media (max-width: 560px) {
  .dcats-business-workspace-actions { grid-template-columns: 1fr; }
  .dcats-business-workspace-b2 { grid-template-columns: 1fr; }
  .dcats-business-workspace-b2-control { align-items: stretch; flex-direction: column; width: 100%; }
}
.sales-order-workspace { display: grid; flex: 1; grid-template-columns: minmax(360px, 430px) minmax(0, 1fr); min-height: 0; overflow: hidden; }
.sales-order-list-pane { min-width: 0; min-height: 0; border-right: 1px solid #d5dbe1; background: #f8f9fb; }
.sales-order-list-head { display: flex; align-items: center; justify-content: space-between; height: 44px; border-bottom: 1px solid #d5dbe1; padding: 0 14px; background: #e9edf1; color: #344054; font-size: 11px; }
.sales-order-list { height: calc(100% - 44px); overflow-y: auto; }
.sales-order-list-row { display: grid; grid-template-columns: 22px minmax(150px, 1fr) 42px 86px auto; align-items: center; gap: 9px; min-height: 82px; border-bottom: 1px solid #e0e4e8; padding: 10px 12px; background: #fff; cursor: pointer; }
.sales-order-list-row:hover { background: #f7faf8; }
.sales-order-list-row.selected { box-shadow: inset 4px 0 0 #287356; background: #eef7f2; }
.sales-order-check { display: inline-flex; align-items: center; justify-content: center; }
.sales-order-list-main { min-width: 0; }
.sales-order-list-main strong,
.sales-order-list-main span,
.sales-order-list-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sales-order-list-main strong { color: #17231f; font-size: 12px; }
.sales-order-list-main span { margin-top: 3px; color: #42514b; font-size: 10px; }
.sales-order-list-main small { margin-top: 3px; color: #78837e; font-size: 9px; }
.sales-order-source { display: inline-flex; width: fit-content; margin-top: 4px; border: 1px solid #b7791f; border-radius: 3px; padding: 1px 5px; background: #fff7db; color: #7a4c00; font-size: 9px; font-style: normal; font-weight: 700; line-height: 1.4; }
.sales-order-list-count,
.sales-order-list-total { text-align: right; }
.sales-order-list-count span,
.sales-order-list-total span { display: block; color: #7a8580; font-size: 8px; }
.sales-order-list-count strong,
.sales-order-list-total strong { color: #26352f; font-size: 11px; font-variant-numeric: tabular-nums; }
.sales-order-status { display: inline-flex; align-items: center; justify-content: center; min-width: 60px; height: 24px; box-sizing: border-box; border: 1px solid #b8c4bf; border-radius: 999px; padding: 0 9px; background: #f4f6f5; color: #56645e; font-size: 9px; font-weight: 800; line-height: 1; letter-spacing: 0; white-space: nowrap; }
.sales-order-status.submitted { border-color: #e2b873; background: #fff8e8; color: #805600; }
.sales-order-status.accepted,
.sales-order-status.shipping_ready { border-color: #8eb6d8; background: #edf6fd; color: #245b87; }
.sales-order-status.shipped,
.sales-order-status.completed { border-color: #8fc2a4; background: #edf8f1; color: #22643e; }
.sales-order-status.cancelled { border-color: #d7a0a0; background: #fff1f1; color: #963838; }
.sales-order-accounting-status { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; border: 1px solid #c8d1da; border-radius: 4px; padding: 3px 7px; background: #f5f7f9; color: #536272; font-size: 9px; font-style: normal; font-weight: 800; line-height: 1.2; letter-spacing: 0; white-space: nowrap; }
.sales-order-accounting-status.not-exported { border-color: #e4b36a; background: #fff8e8; color: #805600; }
.sales-order-accounting-status.registration-pending { border-color: #88add0; background: #eef6fd; color: #245b87; }
.sales-order-accounting-status.registered { border-color: #87b99b; background: #edf8f1; color: #22643e; }
.sales-order-accounting-status.unknown { border-color: #d19b96; background: #fff3f2; color: #963838; }
.sales-order-status-summary { display: grid; flex: 0 0 auto; justify-items: end; gap: 3px; }
.sales-order-status-summary > small { color: #66737d; font-size: 8px; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.sales-order-detail-pane { min-width: 0; overflow-y: auto; padding: 22px 24px 44px; background: #fff; }
.sales-order-empty { display: grid; place-items: center; min-height: 180px; padding: 24px; color: #7c8791; font-size: 12px; text-align: center; }
.sales-order-empty-guidance { align-content: center; gap: 7px; }
.sales-order-empty-guidance strong { color: #344054; font-size: 15px; }
.sales-order-empty-guidance span { max-width: 360px; color: #7c8791; font-size: 11px; line-height: 1.6; }
.sales-order-detail-head { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(300px, 1.15fr) auto; align-items: center; gap: 18px; padding-bottom: 16px; border-bottom: 2px solid #d9dfe4; }
.sales-order-detail-head span { color: #78828d; font-size: 9px; }
.sales-order-detail-head h2 { margin-top: 3px; color: #182230; font-size: 22px; letter-spacing: 0; }
.sales-order-detail-head strong { display: block; margin-top: 4px; color: #344054; font-size: 12px; }
.sales-order-detail-state-summary { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.sales-order-detail-total { display: grid; gap: 1px; min-width: 96px; text-align: right; }
.sales-order-detail-total span { color: #6f7a84; font-size: 9px; font-weight: 700; }
.sales-order-detail-total strong { margin: 0; color: #1b6641; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sales-order-progress { display: grid; grid-template-columns: repeat(5, minmax(46px, 1fr)); min-width: 0; }
.sales-order-progress-step { display: grid; grid-template-columns: 19px minmax(0, 1fr); align-items: center; gap: 4px; min-width: 0; border-top: 3px solid #d7dde3; padding: 6px 3px 0; }
.sales-order-progress-step > span { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #e8ecf0; color: #6f7983; font-size: 8px; font-weight: 900; }
.sales-order-progress-step > strong { min-width: 0; overflow: hidden; margin: 0; color: #727d88; font-size: 8px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.sales-order-progress-step.done { border-top-color: #77a88d; }
.sales-order-progress-step.done > span { background: #dff0e6; color: #246746; }
.sales-order-progress-step.current { border-top-color: #287356; }
.sales-order-progress-step.current > span { background: #287356; color: #fff; }
.sales-order-progress-step.current > strong { color: #1f6248; font-weight: 900; }
.sales-order-progress.cancelled { display: grid; grid-template-columns: auto auto; align-items: center; justify-content: center; gap: 7px; min-height: 34px; border: 1px solid #e0adad; border-radius: 5px; background: #fff4f4; }
.sales-order-progress.cancelled > span { color: #93605d; font-size: 8px; font-weight: 800; }
.sales-order-progress.cancelled > strong { margin: 0; color: #963838; font-size: 10px; }
.sales-order-detail-section { margin-top: 22px; }
.sales-order-detail-section h3 { margin-bottom: 8px; color: #344054; font-size: 13px; letter-spacing: 0; }
.sales-order-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sales-order-section-heading h3 { margin: 0; }
.sales-order-pricing-open { min-height: 32px; border: 1px solid #287356; border-radius: 5px; padding: 0 11px; background: #fff; color: #1f684d; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-item-table { overflow-x: auto; border-top: 1px solid #dbe1e6; }
.sales-order-item-head,
.sales-order-item-row { display: grid; grid-template-columns: minmax(210px, 1.6fr) minmax(100px, .7fr) 64px 112px 120px; min-width: 690px; align-items: center; gap: 10px; border-bottom: 1px solid #e1e5e9; padding: 9px 10px; }
.sales-order-item-head { background: #f2f4f6; color: #667085; font-size: 9px; font-weight: 800; }
.sales-order-item-row { color: #344054; font-size: 11px; }
.sales-order-item-row > div strong,
.sales-order-item-row > div small { display: block; overflow-wrap: anywhere; }
.sales-order-item-row > div small { margin-top: 2px; color: #7a858e; font-size: 9px; }
.sales-order-item-head > :nth-child(n + 3),
.sales-order-item-row > :nth-child(n + 3) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sales-order-core-charge-row { background: transparent; }
.sales-order-charge-row { background: #fbfcfc; }
.sales-order-charge-row > div strong { color: #3c4a43; }
.sales-order-adjustment-row { border-left: 3px solid #c96a61; padding-left: 7px; background: #fff8f7; }
.sales-order-adjustment-row > div strong,
.sales-order-adjustment-row > span:nth-child(4),
.sales-order-adjustment-row > strong:nth-child(5) { color: #a13b30; }
.sales-order-shipping-row { border-top: 2px solid #cdd8d2; }
.sales-order-shipping-row > div strong { color: #285b45; }
.sales-order-tax-row > div strong { color: #425066; }
.sales-order-total-row { border-top: 2px solid #8bb19e; background: #eaf5ef; }
.sales-order-total-row > div strong,
.sales-order-total-row > strong:nth-child(5) { color: #175d3d; font-weight: 900; }
.sales-order-address { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(220px, .8fr); gap: 8px 28px; border-top: 1px solid #dbe1e6; padding-top: 18px; }
.sales-order-address h3 { grid-column: 1 / -1; }
.sales-order-address p { color: #344054; font-size: 11px; line-height: 1.7; }
.sales-order-address dl { display: grid; gap: 6px; }
.sales-order-address dl > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; }
.sales-order-address dt { color: #7b858e; font-size: 9px; }
.sales-order-address dd { overflow-wrap: anywhere; color: #344054; font-size: 10px; font-weight: 700; }
.sales-order-waybill-detail { display: grid; gap: 2px; min-width: 0; }
.sales-order-waybill-detail strong { color: #273c31; font-size: 10px; line-height: 1.35; }
.sales-order-waybill-detail span { color: #667085; font-size: 9px; font-weight: 600; line-height: 1.35; }
.sales-order-tracking { border-top: 1px solid #dbe1e6; padding-top: 18px; }
.sales-order-tracking-grid { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) 150px auto; align-items: end; gap: 10px; }
.sales-order-tracking-grid.outbound-only { grid-template-columns: minmax(220px, 1fr) 160px auto; }
.sales-order-tracking-grid label span { display: block; margin-bottom: 4px; color: #667085; font-size: 9px; font-weight: 800; }
.sales-order-tracking-grid input { width: 100%; height: 36px; border: 1px solid #b8c1cc; border-radius: 5px; padding: 0 9px; color: #253140; font-size: 12px; }
.sales-order-tracking-grid button { min-height: 36px; border: 1px solid #287356; border-radius: 6px; padding: 0 12px; background: #287356; color: #fff; font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-tracking > p { margin-top: 6px; color: #7b858e; font-size: 9px; }
.sales-order-dispatch { border-top: 1px solid #dbe1e6; padding-top: 18px; }
.sales-order-dispatch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.sales-order-dispatch-head h3 { margin: 0; }
.sales-order-dispatch-head p { margin-top: 4px; color: #687386; font-size: 10px; line-height: 1.5; }
.sales-order-dispatch-status { flex: 0 0 auto; border: 1px solid #c8d1da; border-radius: 5px; padding: 4px 7px; background: #f3f5f7; color: #536171; font-size: 9px; font-weight: 800; white-space: nowrap; }
.sales-order-dispatch-status.preparing { border-color: #ddbd71; background: #fff8e8; color: #79590f; }
.sales-order-dispatch-status.ready { border-color: #79b48f; background: #edf8f2; color: #236444; }
.sales-order-dispatch-status.shipped { border-color: #8da9c7; background: #edf4fb; color: #2a5682; }
.sales-order-dispatch-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; border: 1px solid #dce2e8; }
.sales-order-dispatch-summary > div { min-width: 0; border-right: 1px solid #dce2e8; padding: 8px 10px; background: #f8fafb; }
.sales-order-dispatch-summary > div:last-child { border-right: 0; }
.sales-order-dispatch-summary span,
.sales-order-dispatch-summary strong { display: block; }
.sales-order-dispatch-summary span { color: #74808d; font-size: 9px; }
.sales-order-dispatch-summary strong { overflow-wrap: anywhere; margin-top: 3px; color: #263548; font-size: 11px; }
.sales-order-dispatch-serials { margin-top: 7px; border-top: 1px solid #dce2e8; padding-top: 7px; }
.sales-order-dispatch-serials > span { color: #596876; font-weight: 800; }
.sales-order-dispatch-serial-list { display: grid; gap: 4px; margin-top: 5px; }
.sales-order-dispatch-serial-list code { display: block; overflow-wrap: anywhere; border-left: 3px solid #287356; padding: 3px 0 3px 7px; color: #172d23; font-family: Consolas, "Courier New", monospace; font-size: 11px; font-weight: 800; }
.sales-order-dispatch-serial-empty { display: block; margin-top: 5px; color: #7b858e; font-size: 10px; font-style: normal; font-weight: 700; }
.sales-order-waybill-progress { margin-top: 12px; border-top: 1px solid #dce2e8; padding-top: 12px; }
.sales-order-waybill-progress-heading h4 { margin: 0; color: #2c3947; font-size: 11px; }
.sales-order-waybill-progress-heading p { margin: 3px 0 0; color: #74808d; font-size: 9px; line-height: 1.45; }
.sales-order-waybill-progress-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 8px; }
.sales-order-waybill-progress-card { min-width: 0; overflow: hidden; border: 1px solid #d7dfe5; border-radius: 7px; background: #fff; }
.sales-order-waybill-progress-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #e1e6ea; padding: 8px 10px; background: #f7faf8; }
.sales-order-waybill-progress-card-head > strong { color: #263548; font-size: 11px; }
.sales-order-waybill-progress-status { flex: 0 0 auto; border: 1px solid #c3cdd5; border-radius: 999px; padding: 3px 7px; background: #f3f5f7; color: #566371; font-size: 9px; font-weight: 900; white-space: nowrap; }
.sales-order-waybill-progress-status.success { border-color: #8fc2a4; background: #edf8f1; color: #22643e; }
.sales-order-waybill-progress-status.processing { border-color: #8da9c7; background: #edf4fb; color: #2a5682; }
.sales-order-waybill-progress-status.warning { border-color: #d9b35c; background: #fff8e7; color: #76570d; }
.sales-order-waybill-progress-status.danger { border-color: #dc918b; background: #fff2f0; color: #a42d25; }
.sales-order-waybill-progress-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.sales-order-waybill-progress-card.has-editor dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sales-order-waybill-progress-card dl > div { min-width: 0; border-right: 1px solid #e4e8eb; padding: 8px 9px; }
.sales-order-waybill-progress-card dl > div:last-child { border-right: 0; }
.sales-order-waybill-progress-card dt { color: #7a8590; font-size: 8px; font-weight: 700; }
.sales-order-waybill-progress-card dd { overflow-wrap: anywhere; margin: 3px 0 0; color: #344054; font-size: 10px; font-weight: 800; line-height: 1.35; }
.sales-order-waybill-progress-editor { border-top: 1px solid #e4e8eb; padding: 9px; background: #fbfcfc; }
.sales-order-waybill-progress-editor > p,
.sales-order-waybill-progress-note { margin: 0; color: #667085; font-size: 9px; line-height: 1.45; }
.sales-order-waybill-progress-editor .sales-order-tracking-grid { grid-template-columns: minmax(0, 1fr) minmax(125px, 145px) minmax(136px, max-content); gap: 7px; margin-top: 0; }
.sales-order-waybill-progress-editor > p + .sales-order-tracking-grid { margin-top: 7px; }
.sales-order-waybill-progress-editor .sales-order-tracking-grid > * { min-width: 0; }
.sales-order-waybill-progress-editor .sales-order-tracking-grid button { width: 100%; padding-right: 10px; padding-left: 10px; }
.sales-order-tracking-actions { display: flex; align-items: stretch; gap: 7px; }
.sales-order-tracking-actions button { flex: 1 1 auto; width: auto; }
.sales-order-tracking-actions button.secondary { border-color: #aeb9c2; background: #fff; color: #344054; }
.sales-order-carrier-tracking-row { display: flex; justify-content: flex-end; border-top: 1px solid #e4e8eb; padding: 8px 9px; background: #f7faf8; }
.sales-order-carrier-tracking { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; border: 1px solid #287356; border-radius: 5px; padding: 0 11px; background: #fff; color: #1f684d; font-size: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.sales-order-carrier-tracking:hover { background: #edf7f2; }
.sales-order-carrier-tracking:focus-visible { outline: 3px solid rgba(40, 115, 86, .22); outline-offset: 2px; }
.sales-order-tracking-grid input[readonly],
.sales-order-tracking-grid input:disabled { border-color: #d5dce2; background: #f2f4f5; color: #344054; cursor: default; }
.sales-order-waybill-progress-note { border-top: 1px solid #e4e8eb; padding: 8px 9px; background: #fbfcfc; }
.sales-order-dispatch-empty { margin-top: 9px; border-left: 3px solid #8ba7c4; padding: 7px 9px; background: #f4f8fb; color: #586777; font-size: 10px; line-height: 1.55; }
.sales-order-dispatch-actions { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.sales-order-dispatch-actions button { min-height: 34px; border: 1px solid #8795a3; border-radius: 5px; padding: 0 11px; background: #fff; color: #344054; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-dispatch-actions .sales-order-dispatch-primary { border-color: #287356; background: #287356; color: #fff; }
.sales-order-dispatch-actions button:disabled { border-color: #c6cdd5; background: #e6e9ed; color: #8b939d; cursor: not-allowed; }
.sales-order-print-jobs { margin-top: 10px; border-top: 1px solid #dce2e8; }
.sales-order-print-jobs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; padding: 6px 0; }
.sales-order-print-jobs-head > strong { color: #344054; font-size: 10px; }
.sales-order-print-jobs-head button { min-height: 28px; border: 1px solid #7f8d99; border-radius: 5px; padding: 0 9px; background: #fff; color: #344054; font-size: 9px; font-weight: 800; cursor: pointer; }
.sales-order-print-job { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border-top: 1px solid #e3e7eb; padding: 7px 8px; background: #fafbfc; }
.sales-order-print-job > div { min-width: 0; }
.sales-order-print-job strong,
.sales-order-print-job span { display: block; }
.sales-order-print-job strong { color: #2c3947; font-size: 10px; }
.sales-order-print-job > div span { overflow: hidden; margin-top: 2px; color: #74808d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sales-order-print-job > time { color: #74808d; font-size: 9px; white-space: nowrap; }
.sales-order-print-job-status { border: 1px solid #aab5bf; border-radius: 4px; padding: 2px 6px; background: #f1f3f5; color: #5b6671; font-size: 9px; font-weight: 900; white-space: nowrap; }
.sales-order-print-job-status.printed { border-color: #79b48f; background: #edf8f2; color: #236444; }
.sales-order-print-job-status.queued,
.sales-order-print-job-status.claimed { border-color: #8da9c7; background: #edf4fb; color: #2a5682; }
.sales-order-print-job-status.error { border-color: #dc918b; background: #fff2f0; color: #a42d25; }
.sales-order-detail-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; border-top: 1px solid #dbe1e6; padding-top: 16px; }
.sales-order-action { min-height: 36px; border: 1px solid #8996a3; border-radius: 6px; padding: 0 14px; background: #fff; color: #344054; font-size: 11px; font-weight: 800; cursor: pointer; }
.sales-order-action.accept,
.sales-order-action.prepare_shipping,
.sales-order-action.ship { border-color: #287356; background: #287356; color: #fff; }
.sales-order-action.cancel { border-color: #d64545; color: #b42318; }
.sales-order-secondary-actions { position: relative; }
.sales-order-secondary-actions > summary { min-height: 34px; border: 1px solid #aeb7c0; border-radius: 5px; padding: 9px 28px 0 10px; background: #fff; color: #4e5b68; font-size: 10px; font-weight: 800; list-style: none; cursor: pointer; white-space: nowrap; }
.sales-order-secondary-actions > summary::-webkit-details-marker { display: none; }
.sales-order-secondary-actions > summary::after { position: absolute; top: 10px; right: 10px; content: "▼"; color: #7a8590; font-size: 7px; }
.sales-order-secondary-actions[open] > summary { border-color: #788795; background: #f6f8f9; }
.sales-order-secondary-actions > div { position: absolute; z-index: 6; top: calc(100% + 5px); right: 0; min-width: 152px; border: 1px solid #cbd2d9; padding: 6px; background: #fff; box-shadow: 0 7px 18px rgba(29, 41, 57, .16); }
.sales-order-secondary-actions > div .sales-order-action { width: 100%; }
.sales-order-secondary-actions > div .sales-order-action + .sales-order-action { margin-top: 5px; }
.sales-order-secondary-actions > summary:focus-visible,
.sales-order-action.cancel:focus-visible { outline: 3px solid rgba(37, 99, 235, .25); outline-offset: 2px; }
.sales-order-detail-message { min-height: 18px; margin-top: 9px; color: #22643e; font-size: 10px; font-weight: 700; text-align: right; }
.sales-order-detail-message.error { color: #b42318; }
.sales-order-pricing-history { border-top: 1px solid #dbe1e6; padding-top: 18px; }
.sales-order-pricing-history-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-top: 1px solid #e1e5e9; padding: 8px 4px; }
.sales-order-pricing-history-row time { color: #75808c; font-size: 9px; }
.sales-order-pricing-history-row strong { overflow-wrap: anywhere; color: #344054; font-size: 10px; }
.sales-order-pricing-history-row span { color: #3d4c5e; font-size: 10px; font-weight: 800; white-space: nowrap; }
.form-card.sales-order-pricing-card { width: min(980px, calc(100vw - 28px)); max-width: 980px; max-height: calc(100vh - 40px); border-radius: 8px; overflow-y: auto; padding: 0; }
.sales-order-pricing-heading { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid #d8dfe5; padding: 18px 20px; background: #fff; }
.sales-order-pricing-heading > div > span { color: #287356; font-size: 9px; font-weight: 900; }
.sales-order-pricing-heading h3 { margin: 3px 0 0; color: #1d2939; font-size: 20px; letter-spacing: 0; }
.sales-order-pricing-heading p { margin: 5px 0 0; color: #667085; font-size: 10px; font-weight: 700; }
.sales-order-pricing-heading button { flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid #c8d0d8; border-radius: 5px; background: #fff; color: #53606e; cursor: pointer; }
.sales-order-pricing-note { margin: 14px 20px 0; border-left: 3px solid #6f9b86; padding: 7px 9px; background: #f2f7f4; color: #4f6259; font-size: 10px; line-height: 1.55; }
#sales-order-pricing-content { padding: 16px 20px 4px; }
.sales-order-pricing-items { border-top: 1px solid #d8dfe5; }
.sales-order-pricing-item-head,
.sales-order-pricing-item { display: grid; grid-template-columns: minmax(230px, 1fr) 54px 150px 130px; align-items: end; gap: 10px; border-bottom: 1px solid #e1e6eb; padding: 9px 8px; }
.sales-order-pricing-item-head { align-items: center; background: #f3f5f7; color: #667085; font-size: 9px; font-weight: 800; }
.sales-order-pricing-product strong,
.sales-order-pricing-product small { display: block; }
.sales-order-pricing-product strong { color: #263342; font-size: 12px; }
.sales-order-pricing-product small { margin-top: 3px; color: #78838f; font-size: 9px; }
.sales-order-pricing-item label span,
.sales-order-pricing-quantity span,
.sales-order-pricing-line-total span,
.sales-order-pricing-order-fields label > span,
.sales-order-pricing-reason > span { display: block; margin-bottom: 4px; color: #687482; font-size: 9px; font-weight: 800; }
.sales-order-pricing-quantity strong,
.sales-order-pricing-line-total strong { display: block; min-height: 36px; padding-top: 9px; color: #263342; font-size: 11px; text-align: right; }
.sales-order-pricing-item input,
.sales-order-pricing-order-fields input,
.sales-order-pricing-adjustment-row input,
.sales-order-pricing-adjustment-row select { width: 100%; height: 36px; border: 1px solid #aeb9c4; border-radius: 5px; padding: 0 9px; background: #fff; color: #22303f; font-size: 12px; font-variant-numeric: tabular-nums; }
.sales-order-pricing-item input,
.sales-order-pricing-order-fields input,
.sales-order-pricing-adjustment-row input[type="number"] { text-align: right; }
.sales-order-pricing-order-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.sales-order-pricing-adjustment-rows { display: grid; gap: 7px; }
.sales-order-pricing-adjustment-row { display: grid; grid-template-columns: minmax(120px, .7fr) 118px minmax(150px, 1fr) auto; align-items: end; gap: 7px; border-bottom: 1px solid #e2e6ea; padding-bottom: 7px; }
.sales-order-pricing-adjustment-row label > span { display: block; margin-bottom: 4px; color: #687482; font-size: 9px; font-weight: 800; }
.sales-order-pricing-adjustment-row button { width: 38px; height: 36px; border: 1px solid #d59b95; border-radius: 5px; background: #fff; color: #a13b30; font-size: 9px; font-weight: 800; cursor: pointer; }
.sales-order-pricing-adjustment-add { margin-top: 9px; min-height: 34px; border: 1px solid #287356; border-radius: 5px; padding: 0 11px; background: #fff; color: #1f684d; font-size: 10px; font-weight: 800; cursor: pointer; }
.sales-order-pricing-adjustment-add:disabled { border-color: #c8d0d8; color: #8b939d; cursor: not-allowed; }
.sales-order-pricing-shipping-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.sales-order-pricing-shipping-input button { min-height: 36px; border: 1px solid #287356; border-radius: 5px; padding: 0 11px; background: #fff; color: #1f684d; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-order-pricing-shipping-input button:disabled { border-color: #c8d0d8; color: #8b939d; cursor: not-allowed; }
.sales-order-pricing-preview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 16px; border: 1px solid #d8dfe5; }
.sales-order-pricing-preview > div { border-right: 1px solid #d8dfe5; padding: 9px 10px; text-align: right; }
.sales-order-pricing-preview > div:last-child { border-right: 0; }
.sales-order-pricing-preview span,
.sales-order-pricing-preview strong { display: block; }
.sales-order-pricing-preview span { color: #6f7a86; font-size: 9px; }
.sales-order-pricing-preview strong { margin-top: 3px; color: #273544; font-size: 12px; }
.sales-order-pricing-preview .total { background: #eef7f2; }
.sales-order-pricing-preview .total strong { color: #1b6641; font-size: 15px; }
.sales-order-pricing-reason { display: block; margin-top: 16px; }
.sales-order-pricing-reason textarea { width: 100%; min-height: 64px; border: 1px solid #aeb9c4; border-radius: 5px; padding: 8px 9px; color: #22303f; font-size: 11px; line-height: 1.5; resize: vertical; }
.sales-order-pricing-reason small { display: block; margin-top: 4px; color: #7a8590; font-size: 9px; }
.sales-order-pricing-validation,
.sales-order-pricing-message { min-height: 18px; color: #22643e; font-size: 10px; font-weight: 700; }
.sales-order-pricing-validation { margin-top: 7px; }
.sales-order-pricing-message { margin: 0 20px; text-align: right; }
.sales-order-pricing-validation.error,
.sales-order-pricing-message.error { color: #b42318; }
.sales-order-pricing-card .form-footer { position: sticky; bottom: 0; margin: 0; border-top: 1px solid #d8dfe5; padding: 14px 20px; background: #fff; }
.form-card.sales-accounting-export-card { display: flex; flex-direction: column; width: min(1220px, calc(100vw - 24px)); max-width: 1220px; height: calc(100dvh - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin: 12px; border-radius: 8px; padding: 0; overflow: hidden; }
.sales-accounting-export-heading { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d8dfe5; padding: 16px 20px 14px; background: #fff; }
.sales-accounting-export-heading > div > span { color: #8a5d12; font-size: 9px; font-weight: 900; }
.sales-accounting-export-heading h3 { margin: 3px 0 0; color: #1d2939; font-size: 20px; letter-spacing: 0; }
.sales-accounting-export-heading p { margin: 5px 0 0; color: #667085; font-size: 10px; line-height: 1.5; }
.sales-accounting-export-heading button { flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid #c8d0d8; border-radius: 5px; background: #fff; color: #53606e; cursor: pointer; }
.sales-accounting-export-body { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sales-accounting-export-filter { flex: 0 0 auto; display: grid; grid-template-columns: minmax(170px, .9fr) minmax(140px, .7fr) minmax(140px, .7fr) auto auto; align-items: end; gap: 10px; border-bottom: 1px solid #d8dfe5; padding: 12px 20px; background: #f7f9fa; }
.sales-accounting-export-filter label > span { display: block; margin-bottom: 4px; color: #667085; font-size: 9px; font-weight: 800; }
.sales-accounting-export-filter select,
.sales-accounting-export-filter input[type="date"] { width: 100%; height: 36px; border: 1px solid #aeb9c4; border-radius: 5px; padding: 0 9px; background: #fff; color: #263544; font-size: 11px; }
.sales-accounting-export-included { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; border: 1px solid #ccd3da; border-radius: 5px; padding: 0 10px; background: #fff; color: #485563; font-size: 10px; font-weight: 800; white-space: nowrap; }
.sales-accounting-export-included input { width: 15px; height: 15px; accent-color: #287356; }
.sales-accounting-export-filter .btn-primary { min-height: 36px; border-radius: 5px; padding: 0 14px; white-space: nowrap; }
.sales-accounting-export-order-context { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #c9d9d1; border-left: 4px solid #287356; padding: 8px 20px; background: #eaf5ef; color: #245c45; }
.sales-accounting-export-order-context[hidden] { display: none; }
.sales-accounting-export-order-context span { font-size: 9px; font-weight: 700; }
.sales-accounting-export-order-context strong { font-size: 11px; }
.sales-accounting-export-directory { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #d8dfe5; padding: 9px 20px; background: #f2f8f5; }
.sales-accounting-export-directory[hidden] { display: none; }
.sales-accounting-export-directory > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sales-accounting-export-directory > div:first-child { flex-wrap: wrap; }
.sales-accounting-export-directory > div:first-child > span { color: #52645b; font-size: 9px; font-weight: 800; }
.sales-accounting-export-directory strong { overflow-wrap: anywhere; color: #1d513b; font-size: 10px; }
.sales-accounting-export-directory small { flex-basis: 100%; color: #66756d; font-size: 9px; line-height: 1.45; }
.sales-accounting-export-directory-state { color: #8a5d12; font-size: 9px; font-weight: 800; white-space: nowrap; }
.sales-accounting-export-directory-state.ready { color: #1f6a48; }
.sales-accounting-export-directory-state.error { color: #b42318; }
.sales-accounting-export-directory button { min-height: 30px; border: 1px solid #287356; border-radius: 4px; padding: 0 9px; background: #fff; color: #236548; font-size: 9px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.sales-accounting-export-directory button:disabled { border-color: #cbd2d8; color: #939ca5; cursor: not-allowed; }
.sales-accounting-export-summary { flex: 0 0 auto; min-height: 34px; border-bottom: 1px solid #d8dfe5; padding: 9px 20px; background: #fff; color: #4d5d6c; font-size: 10px; font-weight: 700; line-height: 1.5; }
.sales-accounting-export-summary.error { color: #b42318; }
.sales-accounting-sales-guide,
.sales-accounting-troubleshooting-guide { flex: 0 0 auto; border-bottom: 1px solid #d8dfe5; }
.sales-accounting-sales-guide[hidden],
.sales-accounting-troubleshooting-guide[hidden] { display: none; }
.sales-accounting-sales-guide { background: #f1f8f4; }
.sales-accounting-troubleshooting-guide { background: #fff8f6; }
.sales-accounting-sales-guide > summary,
.sales-accounting-troubleshooting-guide > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 42px; padding: 9px 20px; font-size: 11px; font-weight: 900; cursor: pointer; list-style: none; }
.sales-accounting-sales-guide > summary { color: #245b43; }
.sales-accounting-troubleshooting-guide > summary { color: #85362e; }
.sales-accounting-sales-guide > summary::-webkit-details-marker,
.sales-accounting-troubleshooting-guide > summary::-webkit-details-marker { display: none; }
.sales-accounting-sales-guide > summary::before,
.sales-accounting-troubleshooting-guide > summary::before { content: "\25B6"; font-size: 9px; }
.sales-accounting-sales-guide > summary::before { color: #287356; }
.sales-accounting-troubleshooting-guide > summary::before { color: #b5473e; }
.sales-accounting-sales-guide[open] > summary::before,
.sales-accounting-troubleshooting-guide[open] > summary::before { content: "\25BC"; }
.sales-accounting-sales-guide > summary > small,
.sales-accounting-troubleshooting-guide > summary > small { color: #6f7a75; font-size: 9px; font-weight: 700; text-align: right; }
.sales-accounting-sales-guide-body { border-top: 1px solid #cfe1d7; padding: 12px 20px 14px; }
.sales-accounting-sales-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid #cddbd3; padding: 0; counter-reset: sales-csv-step; list-style: none; }
.sales-accounting-sales-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-content: start; gap: 8px; min-width: 0; border-right: 1px solid #d9e3dd; padding: 11px; background: #fff; }
.sales-accounting-sales-steps li:last-child { border-right: 0; }
.sales-accounting-sales-steps li::before { counter-increment: sales-csv-step; content: counter(sales-csv-step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #287356; color: #fff; font-size: 10px; font-weight: 900; }
.sales-accounting-sales-steps strong { display: block; color: #263c32; font-size: 11px; }
.sales-accounting-sales-steps p { margin: 5px 0 0; color: #53645b; font-size: 10px; line-height: 1.6; }
.sales-accounting-sales-note { margin: 10px 0 0; border-left: 3px solid #49896b; padding: 7px 9px; background: #fff; color: #405b4e; font-size: 9px; font-weight: 700; line-height: 1.5; }
.sales-accounting-troubleshooting-body { border-top: 1px solid #edcbc7; padding: 12px 20px 14px; }
.sales-accounting-troubleshooting-intro { margin: 0 0 8px; color: #684943; font-size: 10px; line-height: 1.5; }
.sales-accounting-troubleshooting-list { margin: 0; border-top: 1px solid #e3d3d0; }
.sales-accounting-troubleshooting-list > div { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 1.7fr); border-bottom: 1px solid #e3d3d0; background: #fff; }
.sales-accounting-troubleshooting-list dt,
.sales-accounting-troubleshooting-list dd { min-width: 0; padding: 9px 10px; overflow-wrap: anywhere; font-size: 9px; line-height: 1.55; }
.sales-accounting-troubleshooting-list dt { color: #8b352e; font-weight: 900; }
.sales-accounting-troubleshooting-list dd { margin: 0; border-left: 1px solid #e3d3d0; color: #5e514e; }
.sales-accounting-troubleshooting-caution { margin: 9px 0 0; color: #9a342d; font-size: 9px; font-weight: 800; line-height: 1.5; }
.sales-accounting-hanbaiou-guide { flex: 0 0 auto; border-bottom: 1px solid #d8dfe5; background: #fffaf0; }
.sales-accounting-hanbaiou-guide[hidden] { display: none; }
.sales-accounting-hanbaiou-guide > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 9px 20px; color: #503b13; font-size: 11px; font-weight: 900; cursor: pointer; list-style: none; }
.sales-accounting-hanbaiou-guide > summary::-webkit-details-marker { display: none; }
.sales-accounting-hanbaiou-guide > summary::before { content: "\25B6"; flex: 0 0 auto; color: #9b6b13; font-size: 9px; }
.sales-accounting-hanbaiou-guide[open] > summary::before { content: "\25BC"; }
.sales-accounting-hanbaiou-guide > summary > span { flex: 1; }
.sales-accounting-hanbaiou-guide-body { border-top: 1px solid #ead8b6; padding: 12px 20px 14px; }
.sales-accounting-hanbaiou-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; counter-reset: hanbaiou-step; list-style: none; }
.sales-accounting-hanbaiou-steps li { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; border: 1px solid #dfd2b8; padding: 11px; background: #fff; color: #544b3d; line-height: 1.5; }
.sales-accounting-hanbaiou-steps li::before { counter-increment: hanbaiou-step; content: counter(hanbaiou-step); display: grid; place-items: center; width: 22px; height: 22px; margin-bottom: 8px; border-radius: 50%; background: #9b6b13; color: #fff; font-size: 10px; font-weight: 900; }
.sales-accounting-hanbaiou-step-copy strong { display: block; color: #3e321e; font-size: 11px; }
.sales-accounting-hanbaiou-step-copy p { margin: 5px 0 10px; color: #655b4b; font-size: 10px; font-weight: 500; line-height: 1.6; }
.sales-accounting-hanbaiou-steps button,
.sales-accounting-hanbaiou-history button,
.sales-accounting-hanbaiou-code > button { min-height: 30px; border: 1px solid #8a692d; border-radius: 4px; padding: 0 9px; background: #fff; color: #70511e; font-size: 9px; font-weight: 800; cursor: pointer; }
.sales-accounting-hanbaiou-steps button { align-self: end; width: 100%; }
.sales-accounting-hanbaiou-steps button.primary { border-color: #287356; background: #287356; color: #fff; }
.sales-accounting-hanbaiou-steps button:disabled,
.sales-accounting-hanbaiou-history button:disabled { border-color: #ccd1d6; background: #edf0f2; color: #939aa2; cursor: not-allowed; }
.sales-accounting-hanbaiou-output { display: grid; gap: 5px; margin: 0 0 10px; padding: 8px; background: #f7f3ea; }
.sales-accounting-hanbaiou-output > div { min-width: 0; }
.sales-accounting-hanbaiou-output dt { color: #786b55; font-size: 8px; font-weight: 800; }
.sales-accounting-hanbaiou-output dd { margin: 2px 0 0; overflow-wrap: anywhere; color: #3f3525; font: 700 9px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.sales-accounting-hanbaiou-export-message { margin: -2px 0 9px; border-left: 3px solid #287356; padding: 7px 8px; background: #eef7f2; color: #225f45; font-size: 9px; font-weight: 800; line-height: 1.5; }
.sales-accounting-hanbaiou-export-message[hidden] { display: none; }
.sales-accounting-hanbaiou-export-message.error { border-left-color: #b42318; background: #fff1f0; color: #b42318; }
.sales-accounting-hanbaiou-manual { align-self: end; display: grid; place-items: center; min-height: 30px; border: 1px solid #c5bca9; padding: 5px 8px; background: #f7f3ea; color: #6f624c; font-size: 9px; font-weight: 800; text-align: center; }
.sales-accounting-hanbaiou-utility { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 10px; }
.sales-accounting-hanbaiou-utility span { color: #6a604f; font-size: 9px; line-height: 1.5; }
.sales-accounting-hanbaiou-utility button { min-height: 30px; border: 1px solid #b9c1c8; border-radius: 4px; padding: 0 9px; background: #fff; color: #4d5964; font-size: 9px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-accounting-hanbaiou-utility button:disabled { border-color: #ccd1d6; background: #edf0f2; color: #939aa2; cursor: not-allowed; }
.sales-accounting-hanbaiou-status { display: inline-flex; align-items: center; min-height: 21px; border: 1px solid #c0c8cf; border-radius: 4px; padding: 1px 5px; background: #f4f6f7; color: #596673; font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }
.sales-accounting-hanbaiou-status.issued { border-color: #87a8c9; background: #eef6ff; color: #285d91; }
.sales-accounting-hanbaiou-status.exported { border-color: #d7ad5d; background: #fff8e8; color: #80570d; }
.sales-accounting-hanbaiou-status.registered { border-color: #82b797; background: #eff8f2; color: #246541; }
.sales-accounting-hanbaiou-status.inactive { border-color: #db9c98; background: #fff2f1; color: #9d312a; }
.sales-accounting-hanbaiou-history { display: flex; align-items: center; gap: 6px; overflow-x: auto; margin-top: 8px; }
.sales-accounting-hanbaiou-history > span { flex: 0 0 auto; color: #655b4b; font-size: 9px; font-weight: 800; }
.sales-accounting-hanbaiou-history button { flex: 0 0 auto; min-height: 26px; }
.sales-accounting-hanbaiou-code { display: grid; gap: 4px; }
.sales-accounting-hanbaiou-code-value { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sales-accounting-hanbaiou-code-value strong { overflow-wrap: anywhere; color: #263544; font: 700 9px ui-monospace, SFMono-Regular, Consolas, monospace; }
.sales-accounting-hanbaiou-code > button { justify-self: start; min-height: 26px; padding: 0 7px; }
.sales-accounting-export-workspace { display: grid; flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) 310px; min-height: 260px; overflow: hidden; }
.sales-accounting-export-candidates,
.sales-accounting-export-history { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.sales-accounting-export-candidates { border-right: 1px solid #d8dfe5; }
.sales-accounting-export-history { background: #f8faf9; }
.sales-accounting-export-section-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; border-bottom: 1px solid #d8dfe5; padding: 8px 12px; }
.sales-accounting-export-section-head h4 { color: #293746; font-size: 12px; letter-spacing: 0; }
.sales-accounting-export-section-head span { display: block; margin-top: 2px; color: #72808d; font-size: 9px; }
.sales-accounting-export-section-head > label { display: inline-flex; align-items: center; gap: 6px; color: #53606e; font-size: 9px; font-weight: 800; white-space: nowrap; }
.sales-accounting-export-section-head input { width: 15px; height: 15px; accent-color: #287356; }
.sales-accounting-export-candidate-list,
.sales-accounting-export-history-list { flex: 1 1 auto; min-height: 0; overflow: auto; }
.sales-accounting-export-candidate-empty { display: grid; place-items: center; min-height: 220px; padding: 24px; color: #7c8791; font-size: 11px; line-height: 1.6; text-align: center; }
.sales-accounting-export-candidate-empty.is-clear { color: #246541; font-weight: 800; }
.sales-accounting-export-order { display: grid; grid-template-columns: minmax(150px, .78fr) minmax(230px, 1fr) minmax(260px, 1.2fr) 105px; align-items: start; gap: 10px; min-width: 800px; border-bottom: 1px solid #dfe5ea; padding: 11px 12px; background: #fff; }
.sales-accounting-export-order-simple { grid-template-columns: minmax(180px, .85fr) minmax(250px, 1.35fr) 105px; min-width: 590px; align-items: center; }
.sales-accounting-export-order.exported { background: #f6f7f8; }
.sales-accounting-export-order.has-issues { box-shadow: inset 3px 0 0 #c44c43; }
.sales-accounting-export-order-meta strong,
.sales-accounting-export-order-meta span,
.sales-accounting-export-order-meta small { display: block; overflow-wrap: anywhere; }
.sales-accounting-export-order-meta strong { color: #1d2939; font-size: 11px; }
.sales-accounting-export-order-meta span { margin-top: 3px; color: #536273; font-size: 9px; font-weight: 700; }
.sales-accounting-export-order-meta small { margin-top: 3px; color: #7a8693; font-size: 8px; }
.sales-accounting-export-code-block { min-width: 0; }
.sales-accounting-export-code-block > span { display: block; margin-bottom: 4px; color: #6d7884; font-size: 8px; font-weight: 800; }
.sales-accounting-export-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
.sales-accounting-export-code-row input { width: 100%; min-width: 0; height: 30px; border: 1px solid #aeb8c2; border-radius: 4px; padding: 0 7px; background: #fff; color: #273544; font-size: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.sales-accounting-export-code-row button { min-height: 30px; border: 1px solid #6e7c89; border-radius: 4px; padding: 0 7px; background: #fff; color: #41505f; font-size: 8px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.sales-accounting-export-code-row button:disabled { border-color: #cbd2d8; color: #99a1aa; cursor: not-allowed; }
.sales-accounting-export-code-block em { display: block; margin-top: 3px; color: #6f7b87; font-size: 8px; font-style: normal; }
.sales-accounting-export-product-list { display: grid; gap: 7px; }
.sales-accounting-export-product { border-left: 3px solid #9eb0c0; padding-left: 7px; }
.sales-accounting-export-product > strong { display: block; margin-bottom: 3px; overflow-wrap: anywhere; color: #344054; font-size: 9px; }
.sales-accounting-export-order-products { min-width: 0; }
.sales-accounting-export-order-products strong,
.sales-accounting-export-order-products span { display: block; overflow-wrap: anywhere; }
.sales-accounting-export-order-products strong { color: #273544; font-size: 10px; line-height: 1.4; }
.sales-accounting-export-order-products span { margin-top: 3px; color: #71808c; font-size: 8px; }
.sales-accounting-export-total { text-align: right; }
.sales-accounting-export-total strong,
.sales-accounting-export-total span { display: block; white-space: nowrap; }
.sales-accounting-export-total strong { color: #1f5e42; font-size: 12px; font-variant-numeric: tabular-nums; }
.sales-accounting-export-total span { margin-top: 4px; color: #78838e; font-size: 8px; }
.sales-accounting-export-issues { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.sales-accounting-export-issues span { border: 1px solid #e0a19a; border-radius: 4px; padding: 2px 5px; background: #fff4f2; color: #a6342b; font-size: 8px; font-weight: 700; }
.sales-accounting-export-issues button { min-height: 24px; border: 1px solid #b2701a; border-radius: 4px; padding: 0 7px; background: #fff; color: #87510d; font-size: 8px; font-weight: 800; cursor: pointer; }
.sales-accounting-export-history-row { border-bottom: 1px solid #dde3df; padding: 11px 12px; background: #fff; }
.sales-accounting-export-history-row strong,
.sales-accounting-export-history-row span,
.sales-accounting-export-history-row small { display: block; overflow-wrap: anywhere; }
.sales-accounting-export-history-row strong { color: #26352e; font-size: 10px; }
.sales-accounting-export-history-row span { margin-top: 3px; color: #53635b; font-size: 9px; font-weight: 700; }
.sales-accounting-export-history-row small { margin-top: 3px; color: #7a8580; font-size: 8px; line-height: 1.45; }
.sales-accounting-export-history-title { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.sales-accounting-export-history-title .sales-order-accounting-status { display: inline-flex; flex: 0 0 auto; margin-top: 0; font-size: 8px; }
.sales-accounting-export-history-row .sales-accounting-export-history-registered-at { color: #22643e; font-weight: 800; }
.sales-accounting-export-history-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.sales-accounting-export-history-row button { width: 100%; min-height: 30px; border: 1px solid #287356; border-radius: 4px; background: #fff; color: #287356; font-size: 9px; font-weight: 800; cursor: pointer; }
.sales-accounting-export-history-row button.primary { background: #287356; color: #fff; }
.sales-accounting-export-history-row button:disabled { cursor: wait; opacity: .56; }
.sales-accounting-export-registration-confirm { margin-top: 8px; border: 1px solid #d5a655; padding: 8px; background: #fff9ed; }
.sales-accounting-export-registration-confirm p { margin: 0; color: #6f4c0d; font-size: 9px; font-weight: 700; line-height: 1.45; }
.sales-accounting-export-registration-confirm > div { display: grid; grid-template-columns: .7fr 1.3fr; gap: 6px; margin-top: 7px; }
.sales-accounting-export-message { flex: 0 0 auto; min-height: 20px; border-top: 1px solid #d8dfe5; padding: 8px 20px; color: #22643e; font-size: 10px; font-weight: 700; text-align: right; }
.sales-accounting-export-message.error { color: #b42318; }
.sales-accounting-export-footer { position: relative; z-index: 1; flex: 0 0 auto; margin-top: 0; border-top: 1px solid #d8dfe5; padding: 12px 20px; background: #fff; }
.sales-accounting-export-footer button { min-height: 38px; }
@media (min-width: 821px) and (min-height: 800px) {
  .sales-accounting-export-body { overflow-y: hidden; }
  .sales-accounting-export-workspace { min-height: 0; }
  .sales-accounting-export-body:has(.sales-accounting-troubleshooting-guide[open]),
  .sales-accounting-export-body:has(.sales-accounting-hanbaiou-guide[open]) { overflow-y: auto; }
  .sales-accounting-export-body:has(.sales-accounting-troubleshooting-guide[open]) .sales-accounting-export-workspace,
  .sales-accounting-export-body:has(.sales-accounting-hanbaiou-guide[open]) .sales-accounting-export-workspace { min-height: 180px; }
}
.sales-order-in-house-cancel-card { width: min(520px, calc(100vw - 28px)); padding: 24px; }
.sales-order-in-house-cancel-heading > span { color: #b42318; font-size: 9px; font-weight: 900; }
.sales-order-in-house-cancel-heading h3 { margin: 4px 0 0; color: #1d2939; font-size: 20px; letter-spacing: 0; }
.sales-order-in-house-cancel-heading p { margin: 6px 0 0; color: #5e6875; font-size: 11px; font-weight: 700; }
.sales-order-in-house-cancel-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; border: 1px solid #d8dfe6; }
.sales-order-in-house-cancel-summary > div { min-width: 0; border-right: 1px solid #d8dfe6; border-bottom: 1px solid #d8dfe6; padding: 9px 10px; background: #f8fafb; }
.sales-order-in-house-cancel-summary > div:nth-child(2n) { border-right: 0; }
.sales-order-in-house-cancel-summary > div:nth-last-child(-n + 2) { border-bottom: 0; }
.sales-order-in-house-cancel-summary dt { color: #717d89; font-size: 9px; font-weight: 700; }
.sales-order-in-house-cancel-summary dd { overflow-wrap: anywhere; margin-top: 3px; color: #263544; font-size: 11px; font-weight: 800; }
.sales-order-in-house-cancel-warning { margin: 16px 0 12px; border: 1px solid #e4b4ad; padding: 10px 12px; background: #fff4f2; color: #8f241d; font-size: 11px; font-weight: 700; line-height: 1.6; }
.sales-order-in-house-cancel-confirm { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; margin-bottom: 14px; border: 1px solid #d5dce4; padding: 11px; background: #f8fafc; color: #344054; font-size: 11px; font-weight: 700; line-height: 1.5; cursor: pointer; }
.sales-order-in-house-cancel-confirm input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: #b42318; }
.sales-order-in-house-cancel-card textarea { min-height: 86px; resize: vertical; line-height: 1.5; }
.sales-order-in-house-cancel-card .form-row small { display: block; margin-top: 4px; color: #7a8590; font-size: 9px; }
.sales-order-in-house-cancel-result { min-height: 18px; color: #22643e; font-size: 10px; font-weight: 700; }
.sales-order-in-house-cancel-result.error { color: #b42318; }
.sales-order-in-house-cancel-card .btn-danger:disabled { border-color: #d0d5dd; background: #e4e7ec; color: #98a2b3; cursor: not-allowed; }
.development-test-order-purge-card .form-row { margin: 14px 0; }
.development-test-order-purge-card .form-row label { color: #344054; font-size: 11px; font-weight: 800; }
.development-test-order-purge-card .form-row input { width: 100%; min-height: 40px; margin-top: 6px; border: 1px solid #9aa6b2; border-radius: 5px; padding: 8px 10px; background: #fff; color: #172b3f; font-size: 14px; font-weight: 800; letter-spacing: 0; }
.development-test-order-purge-card .form-row input:focus { border-color: #b42318; outline: 3px solid rgba(180,35,24,.14); }
.development-test-order-purge-card .form-row small { display: block; margin-top: 5px; color: #667085; font-size: 9px; line-height: 1.5; }
.sales-order-shipment-history { border-top: 1px solid #dbe1e6; }
.sales-order-shipment-history-row { display: grid; grid-template-columns: 86px minmax(180px, 1fr) minmax(170px, .8fr) 54px; align-items: center; gap: 12px; border-bottom: 1px solid #e1e5e9; padding: 10px; }
.sales-order-shipment-history-row.superseded { opacity: .58; background: #f7f8f9; }
.sales-order-shipment-history-row .direction { justify-self: start; border: 1px solid #80ae98; border-radius: 4px; padding: 3px 6px; background: #edf8f2; color: #236444; font-size: 9px; font-weight: 800; }
.sales-order-shipment-history-row .direction.core_return { border-color: #d9a091; background: #fff4f1; color: #934536; }
.sales-order-shipment-history-row strong,
.sales-order-shipment-history-row small { display: block; overflow-wrap: anywhere; }
.sales-order-shipment-history-row strong { color: #26352f; font-size: 11px; }
.sales-order-shipment-history-row small { margin-top: 2px; color: #748078; font-size: 9px; }
.sales-order-shipment-history-row .state { justify-self: end; color: #64736c; font-size: 9px; font-weight: 800; }

.shipping-document-mgmt-body { display: flex; flex: 1; flex-direction: column; min-height: 0; background: #eef1f4; color: #23303d; }
.shipping-document-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 1px solid #d5dbe1; padding: 18px 24px; background: #fff; }
.shipping-document-title-block { flex: 1 1 auto; min-width: 0; }
.shipping-document-toolbar h1 { margin-top: 3px; color: #182230; font-size: 22px; letter-spacing: 0; }
.shipping-document-toolbar p { max-width: 680px; margin-top: 5px; color: #667085; font-size: 11px; line-height: 1.55; }
.shipping-document-lookup { flex: 0 0 min(820px, 66vw); width: min(820px, 66vw); min-width: 0; }
.shipping-document-filter-row { display: grid; grid-template-columns: minmax(170px, 1fr) 128px 150px 118px 118px auto; align-items: end; gap: 6px; }
.shipping-document-filter-row input,
.shipping-document-filter-row select { height: 38px; min-width: 0; border: 1px solid #b8c1cc; border-radius: 6px; padding: 0 10px; background: #fff; color: #263241; font-size: 12px; }
.shipping-document-date-filter { min-width: 0; }
.shipping-document-date-filter > span { display: block; margin-bottom: 3px; color: #667085; font-size: 8px; font-weight: 800; }
.shipping-document-filter-row > button { height: 38px; white-space: nowrap; }
.shipping-document-lookup-message { min-height: 16px; margin-top: 5px; color: #557064; font-size: 9px; font-weight: 700; line-height: 1.4; }
.shipping-document-lookup-message.error { color: #b42318; }
.shipping-document-workspace { display: grid; flex: 1; grid-template-columns: minmax(320px, 380px) minmax(0, 1fr); min-height: 0; overflow: hidden; }
.shipping-document-list-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid #d5dbe1; background: #f8f9fb; }
.shipping-document-list-head { display: flex; align-items: center; justify-content: space-between; height: 44px; border-bottom: 1px solid #d5dbe1; padding: 0 14px; background: #e9edf1; color: #344054; font-size: 11px; }
.shipping-document-list-head label { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; }
.shipping-document-list { flex: 1; min-height: 120px; overflow-y: auto; }
.shipping-document-list-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 82px auto; align-items: center; gap: 8px; width: 100%; min-height: 84px; border: 0; border-bottom: 1px solid #e0e4e8; padding: 10px 12px; background: #fff; color: #263241; text-align: left; cursor: pointer; }
.shipping-document-list-row:hover { background: #f5f9f7; }
.shipping-document-list-row.selected { box-shadow: inset 4px 0 0 #287356; background: #eef7f2; }
.shipping-document-row-check { display: flex; align-items: center; justify-content: center; align-self: stretch; cursor: pointer; }
.shipping-document-row-check input { width: 15px; height: 15px; accent-color: #287356; }
.shipping-document-list-main,
.shipping-document-list-meta { min-width: 0; }
.shipping-document-list-main strong,
.shipping-document-list-main small,
.shipping-document-list-meta strong,
.shipping-document-list-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shipping-document-list-main strong { color: #17231f; font-size: 12px; }
.shipping-document-order-id-label { display: block; margin-bottom: 2px; color: #65736d; font-size: 8px; font-weight: 800; line-height: 1.2; }
.shipping-document-list-main small { margin-top: 4px; color: #65736d; font-size: 10px; }
.shipping-document-list-progress { display: block; overflow: hidden; margin-top: 4px; color: #287356; font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.shipping-document-list-meta { text-align: right; }
.shipping-document-list-meta strong { font-size: 10px; font-variant-numeric: tabular-nums; }
.shipping-document-list-meta small { margin-top: 4px; color: #7d8782; font-size: 8px; }
.shipping-document-list-meta strong.direct { color: #9a5f00; }
.shipping-document-list-meta strong.office { color: #315f8c; }
.shipping-document-list-meta strong.standard { color: #287356; }
.shipping-document-batch-panel { flex: 0 0 auto; border-top: 1px solid #cfd6dd; padding: 11px 12px 12px; background: #fff; }
.shipping-document-batch-panel > strong { display: block; color: #2d3a47; font-size: 10px; }
.shipping-document-batch-default-note { display: block; margin-top: 5px; border-left: 3px solid #8aa5bb; padding: 3px 0 3px 7px; color: #5f6d78; font-size: 8px; font-weight: 700; line-height: 1.45; }
.shipping-document-batch-default-note.auto { border-left-color: #287356; color: #236444; }
.shipping-document-batch-default-note.error { border-left-color: #c16b61; color: #a13f35; }
.shipping-document-batch-types { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; margin: 8px 0; }
.shipping-document-batch-types label { display: flex; align-items: center; gap: 5px; min-width: 0; color: #586571; font-size: 9px; line-height: 1.3; }
.shipping-document-batch-types input { flex: 0 0 auto; accent-color: #287356; }
.shipping-document-batch-panel > button { width: 100%; min-height: 34px; border: 1px solid #287356; border-radius: 5px; background: #287356; color: #fff; font-size: 10px; font-weight: 800; cursor: pointer; }
.shipping-document-batch-panel > button:disabled { border-color: #c6cdd5; background: #e6e9ed; color: #8b939d; cursor: not-allowed; }
.shipping-document-batch-panel > p { min-height: 14px; margin-top: 5px; color: #4f715f; font-size: 8px; line-height: 1.4; }
.shipping-document-batch-panel > p.error { color: #b42318; }
.shipping-document-detail-pane { min-width: 0; overflow-y: auto; padding: 20px 24px 44px; background: #fff; }
.shipping-document-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 15px; border-bottom: 2px solid #d9dfe4; }
.shipping-document-detail-head span { color: #78828d; font-size: 9px; }
.shipping-document-detail-head .shipping-document-order-id-label { color: #52606d; font-size: 9px; font-weight: 800; }
.shipping-document-detail-head h2 { margin-top: 3px; color: #182230; font-size: 22px; letter-spacing: 0; }
.shipping-document-detail-target { display: block; margin-top: 3px; color: #78828d; font-size: 9px; }
.shipping-document-detail-head strong { display: block; margin-top: 4px; color: #344054; font-size: 12px; }
.sales-order-workspace-switch { display: flex; align-items: center; justify-content: flex-end; min-height: 42px; border-bottom: 1px solid #dbe1e6; padding: 5px 0; }
.sales-order-workspace-switch > button,
.sales-order-workspace-switch > span { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; border: 1px solid #9aa8b5; padding: 5px 12px; color: #3f4d59; font-size: 10px; font-weight: 800; line-height: 1.35; white-space: nowrap; }
.sales-order-workspace-switch > :first-child { border-radius: 5px 0 0 5px; }
.sales-order-workspace-switch > :last-child { margin-left: -1px; border-radius: 0 5px 5px 0; }
.sales-order-workspace-switch > span[aria-current='page'] { position: relative; z-index: 1; border-color: #287356; background: #eaf5ef; color: #1f6248; }
.sales-order-workspace-switch > button { background: #fff; cursor: pointer; }
.sales-order-workspace-switch > button:hover,
.sales-order-workspace-switch > button:focus-visible { position: relative; z-index: 2; border-color: #287356; color: #1f6248; outline: none; box-shadow: 0 0 0 2px rgba(40, 115, 86, .14); }
.shipping-document-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid #dbe1e6; }
.shipping-document-stages[data-stage-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shipping-document-stages small { display: block; margin-top: 3px; color: #6d7884; font-size: 12px; }
.shipping-document-stages [data-status="unknown"] strong { color: #9a5b12; }
.shipping-document-stages > div { min-width: 0; border-right: 1px solid #e1e5e9; border-top: 3px solid #c3cbd3; padding: 10px 12px; background: #fafbfc; }
.shipping-document-stages > div:last-child { border-right: 0; }
.shipping-document-stages > div.ready { border-top-color: #287356; background: #f2f9f5; }
.shipping-document-stages span,
.shipping-document-stages strong { display: block; overflow-wrap: anywhere; }
.shipping-document-stages span { color: #6d7884; font-size: 9px; font-weight: 800; }
.shipping-document-stages strong { margin-top: 4px; color: #4f5d69; font-size: 11px; }
.shipping-document-stages .ready strong { color: #216342; }
.shipping-document-delivery { border-bottom: 1px solid #dbe1e6; padding: 12px 0; }
.shipping-document-delivery-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.shipping-document-delivery-head h3 { color: #344054; font-size: 13px; letter-spacing: 0; }
.shipping-document-destination-badge { display: inline-flex; align-items: center; min-height: 26px; border: 1px solid #7e9a8f; border-radius: 4px; padding: 3px 8px; background: #eef7f2; color: #236444; font-size: 10px; font-weight: 800; white-space: nowrap; }
.shipping-document-destination-badge.direct { border-color: #d39b37; background: #fff5db; color: #8a5400; }
.shipping-document-destination-badge.office { border-color: #87a8c8; background: #eef6ff; color: #315f8c; }
.shipping-document-delivery-grid { display: grid; grid-template-columns: minmax(280px, 1.2fr) minmax(330px, 1fr); border: 1px solid #cfd7de; background: #fff; }
.shipping-document-destination-card { min-width: 0; border-left: 4px solid #287356; padding: 11px 14px; }
.shipping-document-destination-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; }
.shipping-document-destination-head > .shipping-document-destination-label { min-width: 0; overflow-wrap: anywhere; }
.shipping-document-delivery.direct .shipping-document-destination-card { border-left-color: #d39b37; background: #fffbf0; }
.shipping-document-delivery.office .shipping-document-destination-card { border-left-color: #5887b5; background: #f5f9fd; }
.shipping-document-destination-card > span,
.shipping-document-destination-card > strong { display: block; overflow-wrap: anywhere; }
.shipping-document-destination-label { color: #6d7884; font-size: 10px; font-weight: 800; }
.shipping-document-destination-card > strong { margin-top: 4px; color: #17231f; font-size: 15px; }
.shipping-document-destination-card > strong ~ span { margin-top: 3px; color: #56636e; font-size: 11px; line-height: 1.45; }
.shipping-document-delivery-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; margin: 0; border-left: 1px solid #dbe1e6; }
.shipping-document-delivery-facts > div { min-width: 0; border-right: 1px solid #e3e7ea; padding: 11px 10px; }
.shipping-document-delivery-facts > div:last-child { border-right: 0; }
.shipping-document-delivery-facts dt { color: #6d7884; font-size: 9px; font-weight: 800; }
.shipping-document-delivery-facts dd { margin: 5px 0 0; color: #263241; font-size: 11px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.shipping-document-order-contents { border-bottom: 1px solid #dbe1e6; padding: 9px 0; }
.shipping-document-order-contents-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.shipping-document-order-contents-head h3 { color: #344054; font-size: 11px; letter-spacing: 0; }
.shipping-document-order-contents-head > span { color: #6d7884; font-size: 9px; font-weight: 800; }
.shipping-document-order-items { border-top: 1px solid #e1e5e9; }
.shipping-document-order-item { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(90px, .42fr) 72px 94px; align-items: center; gap: 10px; min-height: 42px; border-bottom: 1px solid #e6eaed; padding: 5px 8px; }
.shipping-document-order-item > div { min-width: 0; }
.shipping-document-order-item > div strong,
.shipping-document-order-item > div span { display: block; overflow-wrap: anywhere; }
.shipping-document-order-item > div strong { color: #243442; font-size: 11px; }
.shipping-document-order-item > div span { margin-top: 1px; color: #6f7a85; font-size: 9px; }
.shipping-document-order-kind,
.shipping-document-order-quantity { color: #40505f; font-size: 9px; font-weight: 700; }
.shipping-document-order-kind strong,
.shipping-document-order-kind small { display: block; overflow-wrap: anywhere; }
.shipping-document-order-kind strong { color: #344054; font-size: 10px; }
.shipping-document-order-kind small { margin-top: 2px; color: #6f7a85; font-size: 9px; }
.shipping-document-order-quantity strong { color: #182230; font-size: 11px; }
.shipping-document-order-core { justify-self: start; border: 1px solid #aab5be; border-radius: 4px; padding: 3px 6px; background: #f5f7f8; color: #596875; font-size: 8px; font-weight: 800; white-space: nowrap; }
.shipping-document-order-core.required { border-color: #e1857d; background: #fff3f1; color: #aa2f25; }
.shipping-document-order-core.charged { border-color: #cf9a45; background: #fff8e8; color: #8a5a12; }
.shipping-document-order-core.returned { border-color: #67a783; background: #edf8f1; color: #236945; }
.shipping-document-order-core.not-required { border-color: #8eb89e; background: #eff8f2; color: #286346; }
.shipping-document-order-empty { border-left: 3px solid #aab5be; padding: 7px 9px; background: #f6f8f9; color: #6d7884; font-size: 9px; }
.shipping-document-section { margin-top: 20px; border-top: 1px solid #dbe1e6; padding-top: 16px; }
.shipping-document-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.shipping-document-section-head h3 { color: #344054; font-size: 13px; letter-spacing: 0; }
.shipping-document-section-head p { margin-top: 4px; color: #687386; font-size: 10px; line-height: 1.55; }
.shipping-document-section-head button,
.shipping-document-primary { min-height: 34px; border: 1px solid #287356; border-radius: 5px; padding: 0 11px; background: #287356; color: #fff; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.shipping-document-section-head button:disabled,
.shipping-document-primary:disabled { border-color: #c6cdd5; background: #e6e9ed; color: #8b939d; cursor: not-allowed; }
.shipping-document-ready-state { flex: 0 0 auto; border: 1px solid #d4b574; border-radius: 4px; padding: 4px 7px; background: #fff8e8; color: #79590f; font-size: 9px; font-weight: 800; white-space: nowrap; }
.shipping-document-ready-state.ready { border-color: #79b48f; background: #edf8f2; color: #236444; }
.shipping-document-ready-state.neutral { border-color: #b9c2ca; background: #f3f5f7; color: #58636e; }
.shipping-document-defaults { max-width: 980px; margin: 0 auto; }
.shipping-document-defaults-head { border-bottom: 2px solid #d9dfe4; padding: 2px 0 16px; }
.shipping-document-defaults-head > span { color: #287356; font-size: 9px; font-weight: 900; }
.shipping-document-defaults-head h2 { margin-top: 3px; color: #182230; font-size: 20px; letter-spacing: 0; }
.shipping-document-defaults-head p { margin-top: 5px; color: #687386; font-size: 10px; line-height: 1.55; }
.shipping-document-default-head,
.shipping-document-default-row { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(250px, 1.25fr) minmax(200px, 1fr); align-items: center; gap: 16px; }
.shipping-document-default-head { min-height: 34px; border-bottom: 1px solid #dbe1e6; padding: 0 12px; background: #f1f4f6; color: #66717d; font-size: 9px; font-weight: 800; }
.shipping-document-default-row { min-height: 58px; border-bottom: 1px solid #e1e5e9; padding: 9px 12px; background: #fff; }
.shipping-document-default-row strong { color: #263543; font-size: 11px; }
.shipping-document-default-row span { color: #344b5d; font-size: 10px; font-weight: 700; }
.shipping-document-default-row small { color: #707d88; font-size: 9px; line-height: 1.45; }
.shipping-document-name-cell { display: grid; align-items: start; justify-items: start; gap: 5px; min-width: 0; }
.shipping-document-name-cell > strong { min-width: 0; line-height: 1.35; }
.shipping-carrier-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 132px;
  width: 132px;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid #cbd7e3;
  border-radius: 5px;
  padding: 5px 8px 5px 5px;
  background: #f7fafc;
  color: #243649;
}
.shipping-carrier-brand.yamato { border-color: #d8ba48; background: #fff9da; }
.shipping-carrier-brand.sagawa { border-color: #9abce1; background: #f1f7fd; }
.shipping-carrier-logo {
  display: grid;
  position: relative;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(44, 64, 85, .14);
  border-radius: 4px;
  background: #fff;
}
.shipping-carrier-logo img {
  position: absolute;
  display: block;
  max-width: none;
  height: auto;
}
.shipping-carrier-brand.yamato .shipping-carrier-logo img { top: -36%; left: -24%; width: 147%; }
.shipping-carrier-brand.sagawa .shipping-carrier-logo img { top: -50%; left: -30%; width: 160%; }
.shipping-carrier-brand-copy { display: grid; flex: 1; place-items: center; min-width: 0; line-height: 1.25; }
.shipping-carrier-brand-copy strong { width: 100%; color: #1e3043; font-size: 10px; text-align: center; white-space: nowrap; }
.shipping-carrier-brand.compact { flex: 0 0 104px; width: 104px; height: 30px; gap: 5px; padding: 3px 6px 3px 3px; }
.shipping-carrier-brand.compact .shipping-carrier-logo { flex-basis: 31px; width: 31px; height: 22px; }
.shipping-carrier-brand.compact .shipping-carrier-brand-copy strong {
  overflow-wrap: anywhere;
  font-size: 8px;
  line-height: 1.1;
  white-space: normal;
}
.shipping-document-carrier-context {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-bottom: 10px;
  border-left: 3px solid #2d6eaa;
  padding: 6px 9px;
  background: #f5f8fb;
}
.shipping-document-required-list { border-top: 1px solid #dbe1e6; }
.shipping-document-required-head,
.shipping-document-required-row { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(210px, 1.1fr) minmax(150px, .8fr) minmax(210px, auto); align-items: center; gap: 14px; }
.shipping-document-required-head { min-height: 34px; border-bottom: 1px solid #dbe1e6; padding: 0 10px; background: #f1f4f6; color: #65717d; font-size: 9px; font-weight: 800; }
.shipping-document-required-row { min-height: 62px; border-bottom: 1px solid #e1e5e9; padding: 8px 10px; }
.shipping-document-required-row > div { min-width: 0; }
.shipping-document-required-row strong,
.shipping-document-required-row span { display: block; }
.shipping-document-required-row .shipping-carrier-brand { display: inline-flex; }
.shipping-document-required-row .shipping-carrier-logo,
.shipping-document-required-row .shipping-carrier-brand-copy { display: grid; }
.shipping-document-required-row strong { color: #2a3745; font-size: 11px; }
.shipping-document-required-row span { color: #73808b; font-size: 9px; }
.shipping-document-required-row .shipping-document-standard { color: #3e5365; font-size: 10px; font-weight: 700; line-height: 1.45; }
.shipping-document-required-row .shipping-document-standard small { display: block; margin-top: 3px; color: #9a5b12; font-size: 8px; font-weight: 900; }
.shipping-document-required-row em { justify-self: start; border: 1px solid #c4ccd3; border-radius: 4px; padding: 3px 6px; background: #f5f7f8; color: #5c6873; font-size: 9px; font-style: normal; font-weight: 800; white-space: nowrap; }
.shipping-document-required-row.ready em { border-color: #83b898; background: #edf8f2; color: #236444; }
.shipping-document-required-row button { justify-self: end; min-height: 32px; border: 1px solid #287356; border-radius: 5px; padding: 0 10px; background: #fff; color: #287356; font-size: 9px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.shipping-document-required-row button:disabled { border-color: #c6cdd5; background: #e6e9ed; color: #8b939d; cursor: not-allowed; }
.shipping-document-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.shipping-document-row-actions button.primary { background: #287356; color: #fff; }
.shipping-document-no-action { width: 100%; color: #7a858f !important; text-align: right; }
.shipping-document-section-empty,
.shipping-document-guidance { border-left: 3px solid #8ba7c4; padding: 8px 10px; background: #f4f8fb; color: #586777; font-size: 10px; line-height: 1.55; }
.shipping-document-b2-history { border-top: 1px solid #dbe1e6; }
.shipping-document-b2-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid #e2e6ea; padding: 9px 10px; background: #fafbfc; }
.shipping-document-b2-row > div { min-width: 0; }
.shipping-document-b2-row strong,
.shipping-document-b2-row span,
.shipping-document-b2-row small { display: block; overflow-wrap: anywhere; }
.shipping-document-b2-row strong { color: #2a3745; font-size: 11px; }
.shipping-document-b2-row span { margin-top: 2px; color: #677481; font-size: 9px; }
.shipping-document-b2-row small { margin-top: 2px; color: #7a858f; font-size: 9px; }
.shipping-document-b2-row button { min-height: 30px; border: 1px solid #4777a6; border-radius: 5px; padding: 0 9px; background: #fff; color: #2d6295; font-size: 9px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.shipping-document-print-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.shipping-document-print-actions button { min-height: 34px; border: 1px solid #287356; border-radius: 5px; padding: 0 11px; background: #fff; color: #287356; font-size: 10px; font-weight: 800; cursor: pointer; }
.shipping-document-print-actions button:disabled { border-color: #c6cdd5; background: #e6e9ed; color: #8b939d; cursor: not-allowed; }
.shipping-document-print-state { display: flex; justify-content: flex-end; gap: 18px; margin-top: 7px; color: #6f7a85; font-size: 9px; }
.shipping-document-waybill-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(140px, .7fr) minmax(190px, 1fr) auto; align-items: end; gap: 10px; }
.shipping-document-waybill-form label > span { display: block; margin-bottom: 4px; color: #667085; font-size: 9px; font-weight: 800; }
.shipping-document-waybill-form select,
.shipping-document-waybill-form input { width: 100%; height: 36px; border: 1px solid #b8c1cc; border-radius: 5px; padding: 0 9px; background: #fff; color: #253140; font-size: 11px; }
.shipping-document-waybill-form button { min-height: 36px; border: 1px solid #287356; border-radius: 5px; padding: 0 12px; background: #287356; color: #fff; font-size: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.shipping-document-waybill-form button:disabled { border-color: #c6cdd5; background: #e6e9ed; color: #8b939d; cursor: not-allowed; }
.shipping-document-waybill-print-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; border-top: 1px solid #e2e7ec; padding-top: 10px; }
.shipping-document-waybill-print-row > div { min-width: 150px; margin-right: auto; }
.shipping-document-waybill-print-row span,
.shipping-document-waybill-print-row strong { display: block; }
.shipping-document-waybill-print-row span { color: #667085; font-size: 9px; font-weight: 800; }
.shipping-document-waybill-print-row strong { margin-top: 3px; color: #344054; font-size: 11px; }
.shipping-document-waybill-print-row strong.printed { color: #236444; }
.shipping-document-waybill-print-row strong.error { color: #a42d25; }
.shipping-document-waybill-print-row button,
.shipping-document-waybill-print-row a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; border: 1px solid #287356; border-radius: 5px; padding: 0 11px; font-size: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.shipping-document-waybill-print-row a { background: #fff; color: #287356; }
.shipping-document-waybill-print-row button:disabled { border-color: #c6cdd5; background: #e6e9ed; color: #8b939d; cursor: not-allowed; }
.shipping-document-form-note { margin-top: 7px; color: #737e88; font-size: 9px; line-height: 1.55; }
.shipping-document-welcome { max-width: 860px; margin: 0 auto; padding-top: 14px; }
.shipping-document-welcome > strong { color: #2b3846; font-size: 14px; }
.shipping-document-welcome > p { margin: 5px 0 14px; color: #697581; font-size: 10px; line-height: 1.55; }
.form-card.shipping-document-settings-card { width: min(760px, calc(100vw - 24px)); max-width: 760px; max-height: calc(100vh - 24px); border-radius: 8px; padding: 0; overflow: auto; }
.shipping-document-settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d8dfdb; padding: 18px 20px 14px; }
.shipping-document-settings-heading span { color: #287356; font-size: 9px; font-weight: 900; }
.shipping-document-settings-heading h3 { margin: 2px 0 0; color: #1d2c25; font-size: 18px; letter-spacing: 0; }
.shipping-document-settings-heading p { margin-top: 5px; color: #68766f; font-size: 9px; line-height: 1.5; }
.shipping-document-settings-heading button { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid #c8d1cc; border-radius: 5px; background: #fff; color: #617068; cursor: pointer; }
#shipping-document-settings-content { padding: 18px 20px; }
.shipping-return-sheet-form { display: grid; gap: 12px; }
.shipping-return-sheet-form label { display: grid; gap: 4px; min-width: 0; font-weight: 600; }
.shipping-return-sheet-form :is(select, input) { box-sizing: border-box; width: 100%; min-width: 0; padding: 7px; font: inherit; }
.shipping-return-sheet-form button { justify-self: end; }
.shipping-return-sheet-form p { margin: 0; overflow-wrap: anywhere; }
.shipping-return-sheet-item { color: #425467; }
.shipping-document-settings-card:has(.shipping-return-sheet-form) .sales-order-detail-message:empty { min-height: 0; }
.shipping-document-settings-card .shipping-document-waybill-form { grid-template-columns: 1fr 1fr; }
.shipping-document-settings-card .shipping-document-waybill-form > label:last-of-type { grid-column: 1 / -1; }
.shipping-document-settings-card .shipping-document-waybill-form > button { grid-column: 1 / -1; justify-self: end; min-width: 132px; }
.shipping-document-temporary-setting { display: grid; gap: 14px; }
.shipping-document-temporary-setting-note { border-left: 4px solid #2d75bd; padding: 9px 11px; background: #f2f7fc; }
.shipping-document-temporary-setting-note strong { color: #28445f; font-size: 12px; }
.shipping-document-temporary-setting-note p { margin-top: 4px; color: #5f7181; font-size: 10px; line-height: 1.55; }
.shipping-document-temporary-setting label > span { display: block; margin-bottom: 5px; color: #526170; font-size: 9px; font-weight: 800; }
.shipping-document-temporary-setting select { width: 100%; height: 38px; border: 1px solid #aeb9c4; border-radius: 5px; padding: 0 10px; background: #fff; color: #263544; font-size: 11px; }
.shipping-document-temporary-setting-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid #dfe5ea; padding-top: 14px; }
.shipping-document-temporary-setting-actions a,
.shipping-document-temporary-setting-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; border: 1px solid #7f8d99; border-radius: 5px; padding: 0 11px; background: #fff; color: #344054; font-size: 9px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.shipping-document-temporary-setting-actions button { cursor: pointer; }
.shipping-document-temporary-setting-actions button.primary { border-color: #287356; background: #287356; color: #fff; }
.shipping-document-temporary-setting-actions button:disabled { border-color: #d1d6dc; background: #eceff2; color: #929aa3; cursor: not-allowed; }
.shipping-document-settings-card .sales-order-detail-message { min-height: 18px; margin: 0 20px; }
.shipping-document-settings-card .form-footer { margin-top: 0; padding: 14px 20px; }
.form-card.shipping-document-b2-reissue-card {
  width: min(720px, calc(100vw - 24px));
  max-width: 720px;
  max-height: calc(100dvh - 24px);
  border-radius: 8px;
  padding: 0;
  overflow: auto;
  color: #25312b;
}
.shipping-document-b2-reissue-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #d8dfdb;
  padding: 18px 20px 15px;
  background: #fff;
}
.shipping-document-b2-reissue-heading > div { min-width: 0; }
.shipping-document-b2-reissue-heading span { color: #287356; font-size: 9px; font-weight: 900; }
.shipping-document-b2-reissue-heading h3 { margin: 2px 0 0; color: #17251e; font-size: 20px; letter-spacing: 0; }
.shipping-document-b2-reissue-heading p { margin-top: 5px; color: #68766f; font-size: 10px; line-height: 1.55; }
.shipping-document-b2-reissue-heading button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid #c8d1cc;
  border-radius: 5px;
  background: #fff;
  color: #617068;
  cursor: pointer;
}
.shipping-document-b2-reissue-heading button:disabled { opacity: .55; cursor: wait; }
.shipping-document-b2-reissue-summary {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-bottom: 1px solid #d8dfdb;
  background: #f4f7f5;
}
.shipping-document-b2-reissue-summary > div { min-width: 0; padding: 11px 14px; border-right: 1px solid #d8dfdb; }
.shipping-document-b2-reissue-summary > div:last-child { border-right: 0; }
.shipping-document-b2-reissue-summary span,
.shipping-document-b2-reissue-summary strong,
.shipping-document-b2-reissue-summary small { display: block; overflow-wrap: anywhere; }
.shipping-document-b2-reissue-summary span { color: #6b7871; font-size: 8px; font-weight: 800; }
.shipping-document-b2-reissue-summary strong { margin-top: 3px; color: #203029; font-size: 12px; }
.shipping-document-b2-reissue-summary small { margin-top: 2px; color: #728078; font-size: 8px; line-height: 1.45; }
.shipping-document-b2-reissue-reason-section { padding: 17px 20px 8px; }
.shipping-document-b2-reissue-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.shipping-document-b2-reissue-section-head h4 { margin: 0; color: #24342c; font-size: 13px; }
.shipping-document-b2-reissue-section-head p { margin-top: 3px; color: #718078; font-size: 9px; }
.shipping-document-b2-reissue-section-head > strong {
  flex: 0 0 auto;
  border: 1px solid #b64a40;
  border-radius: 4px;
  padding: 2px 6px;
  background: #fff6f4;
  color: #9c3128;
  font-size: 8px;
}
.shipping-document-b2-reissue-reasons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.shipping-document-b2-reissue-reasons button {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 72px;
  border: 1px solid #bdc8c2;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: #34443c;
  text-align: left;
  cursor: pointer;
}
.shipping-document-b2-reissue-reasons button:hover { border-color: #6e9b87; background: #f8fbf9; }
.shipping-document-b2-reissue-reasons button.selected { border-color: #287356; box-shadow: inset 0 0 0 1px #287356; background: #edf7f1; color: #18563f; }
.shipping-document-b2-reissue-reasons button:focus-visible,
.shipping-document-b2-reissue-heading button:focus-visible,
.shipping-document-b2-reissue-redownload button:focus-visible,
.shipping-document-b2-reissue-footer button:focus-visible { outline: 3px solid rgba(40, 115, 86, .22); outline-offset: 2px; }
.shipping-document-b2-reissue-reasons button:disabled { opacity: .6; cursor: wait; }
.shipping-document-b2-reissue-reasons strong { font-size: 12px; }
.shipping-document-b2-reissue-reasons small { margin-top: 3px; color: #6c7972; font-size: 8px; line-height: 1.4; }
.shipping-document-b2-reissue-note { display: block; margin-top: 13px; }
.shipping-document-b2-reissue-note > span { display: block; margin-bottom: 5px; color: #48574f; font-size: 9px; font-weight: 800; }
.shipping-document-b2-reissue-note textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  border: 1px solid #aeb9b3;
  border-radius: 5px;
  padding: 9px 10px;
  background: #fff;
  color: #26352e;
  font: inherit;
  font-size: 11px;
  line-height: 1.5;
  resize: vertical;
}
.shipping-document-b2-reissue-note textarea:focus { border-color: #287356; outline: 3px solid rgba(40, 115, 86, .14); }
.shipping-document-b2-reissue-note textarea[aria-invalid="true"] { border-color: #bd4036; background: #fff9f8; }
.shipping-document-b2-reissue-note textarea:disabled { background: #eef1ef; cursor: wait; }
.shipping-document-b2-reissue-note > small { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 5px; color: #748078; font-size: 8px; line-height: 1.45; }
.shipping-document-b2-reissue-note > small b { flex: 0 0 auto; color: #58675f; font-variant-numeric: tabular-nums; }
.shipping-document-b2-reissue-message { min-height: 18px; margin: 0 20px 10px; color: #466b5a; font-size: 12px; font-weight: 800; line-height: 1.45; }
.shipping-document-b2-reissue-message.error { color: #b42318; }
.shipping-document-b2-reissue-redownload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 20px 16px;
  border-left: 4px solid #3f78a5;
  padding: 10px 12px;
  background: #f2f7fb;
}
.shipping-document-b2-reissue-redownload > div { min-width: 0; }
.shipping-document-b2-reissue-redownload strong { color: #2c465a; font-size: 10px; }
.shipping-document-b2-reissue-redownload p { margin-top: 3px; color: #667a89; font-size: 9px; line-height: 1.5; }
.shipping-document-b2-reissue-redownload button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid #3f78a5;
  border-radius: 5px;
  padding: 0 11px;
  background: #fff;
  color: #315f82;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.shipping-document-b2-reissue-redownload button:disabled { opacity: .55; cursor: wait; }
.shipping-document-b2-reissue-history-panel { padding: 0 20px 16px; }
#shipping-document-b2-reissue-overlay [hidden] { display: none; }
.shipping-document-b2-reissue-history-panel .shipping-document-b2-row { align-items: center; gap: 12px; }
.shipping-document-b2-reissue-history-panel .shipping-document-b2-row strong { font-size: 14px; }
.shipping-document-b2-reissue-history-panel .shipping-document-b2-row :is(span, small) { font-size: 12px; }
.shipping-document-b2-reissue-history-panel .shipping-document-b2-row button { font-size: 13px; min-height: 36px; white-space: nowrap; }
.shipping-document-b2-reissue-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #d8dfdb;
  padding: 13px 20px;
  background: #fff;
}
.shipping-document-b2-reissue-footer p { color: #65736c; font-size: 9px; line-height: 1.45; }
.shipping-document-b2-reissue-footer button { min-height: 38px; border-radius: 5px; padding: 0 15px; font-size: 10px; font-weight: 800; }
.shipping-document-b2-reissue-footer .btn-primary { min-width: 174px; border-color: #287356; background: #287356; color: #fff; }
.shipping-document-b2-reissue-footer .btn-primary:hover:not(:disabled) { border-color: #1f6248; background: #1f6248; }
.shipping-document-b2-reissue-footer button:disabled { opacity: .55; cursor: not-allowed; }

/* Order operations: dense list, action-led detail, and compact price editor. */
.sales-order-workspace { grid-template-columns: minmax(330px, 380px) minmax(0, 1fr); }
.sales-order-list-row { grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 8px 10px; min-height: 78px; padding: 8px 10px; }
.sales-order-list-main { min-width: 0; }
.sales-order-list-identity { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sales-order-list-number { flex: 0 0 auto; min-width: 0; overflow: visible !important; font-variant-numeric: tabular-nums; text-overflow: clip !important; white-space: nowrap; }
.sales-order-list-total { display: inline-flex !important; flex: 0 0 auto; align-items: baseline; gap: 4px; margin: 0 !important; text-align: right; white-space: nowrap; }
.sales-order-list-total small,
.sales-order-list-total strong { display: inline; margin: 0; }
.sales-order-list-total small { color: #7a8580; font-weight: 700; }
.sales-order-list-total strong { color: #26352f; font-variant-numeric: tabular-nums; }
.sales-order-list-customer { min-width: 0; margin: 2px 0 0 !important; }
.sales-order-list-context { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 7px; min-width: 0; margin-top: 1px; }
.sales-order-list-meta { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; }
.sales-order-list-meta .sales-order-source { flex: 0 0 auto; margin-top: 0; }
.sales-order-queue-heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; border-bottom: 1px solid #d8dfe4; border-left: 4px solid #56758f; padding: 7px 12px 7px 10px; background: #eef4f8; color: #304c62; }
.sales-order-queue-heading.sales { border-left-color: #c28a22; background: #fff8e8; color: #735415; }
.sales-order-queue-heading strong { font-size: 10px; }
.sales-order-queue-heading span { font-size: 9px; font-weight: 800; }
.sales-order-list-next { display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; min-width: 0; margin: 0; }
.sales-order-list-next span { flex: 0 0 auto; margin: 0; color: #77837d; font-size: 8px; font-weight: 700; }
.sales-order-list-next strong { min-width: 0; overflow: hidden; color: #245e48; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.sales-order-detail-head { align-items: center; min-height: 92px; }
.sales-order-detail-identity { min-width: 0; }
.sales-order-detail-meta { display: flex; align-items: center; gap: 8px; min-height: 18px; }
.sales-order-detail-meta .sales-order-source { margin-top: 0; }
.sales-order-detail-state { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; }
.sales-order-detail-next-actions { display: flex; align-items: center; gap: 8px; border-left: 1px solid #dce2e7; padding-left: 14px; }
.sales-order-detail-next-actions > span { color: #74808b; font-size: 9px; font-weight: 800; white-space: nowrap; }
.sales-order-detail-next-actions > div { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.sales-order-detail-next-actions > strong { color: #687481; font-size: 10px; font-weight: 700; white-space: nowrap; }
.sales-order-detail-next-actions .sales-order-action { min-height: 34px; padding: 0 11px; font-size: 10px; }
.sales-order-detail-nav { position: sticky; top: 0; z-index: 2; display: flex; align-items: stretch; gap: 3px; min-height: 42px; border-bottom: 1px solid #dbe1e6; background: rgba(255,255,255,.97); }
.sales-order-detail-nav button { display: inline-flex; align-items: center; min-height: 42px; border: 0; border-bottom: 2px solid transparent; padding: 0 13px; background: transparent; color: #5f6c79; font-size: 10px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.sales-order-detail-nav button:hover { color: #1f684d; }
.sales-order-detail-nav button[aria-selected="true"] { border-bottom-color: #287356; color: #1f684d; }
.sales-order-detail-nav button:focus-visible { border-bottom-color: #287356; outline: 2px solid #287356; outline-offset: -2px; }
.sales-order-detail-panels { min-height: 0; }
.sales-order-detail-panel[hidden] { display: none !important; }
.sales-order-detail-overview-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sales-order-detail-panel > .sales-order-detail-section:first-child,
.sales-order-detail-panel.sales-order-detail-section { margin-top: 0; }
.sales-order-section-heading { align-items: flex-end; }
.sales-order-section-heading > div { min-width: 0; }
.sales-order-section-heading h3 { margin: 0; }
.sales-order-section-heading p { margin-top: 3px; color: #75808b; font-size: 9px; line-height: 1.45; }
.sales-order-accounting-panel { display: grid; gap: 14px; }
.sales-order-accounting-panel-status { display: inline-flex; align-items: center; min-height: 28px; border: 1px solid #cbd3da; border-radius: 4px; padding: 4px 9px; background: #f3f5f7; color: #55616c; font-size: 9px; font-weight: 900; }
.sales-order-accounting-panel-status.not-exported,
.sales-order-accounting-panel-status.registration-pending,
.sales-order-accounting-panel-status.unknown { border-color: #d5a647; background: #fff8e8; color: #805d13; }
.sales-order-accounting-panel-status.registered { border-color: #75ad91; background: #edf8f2; color: #226447; }
.sales-order-accounting-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #d8dfe5; border-left: 1px solid #d8dfe5; margin: 0; }
.sales-order-accounting-facts > div { min-width: 0; border-right: 1px solid #d8dfe5; border-bottom: 1px solid #d8dfe5; padding: 11px 12px; background: #fff; }
.sales-order-accounting-facts dt { color: #77828c; font-size: 9px; font-weight: 700; }
.sales-order-accounting-facts dd { margin: 4px 0 0; overflow-wrap: anywhere; color: #23332c; font-size: 11px; font-weight: 800; line-height: 1.45; }
.sales-order-accounting-actions { display: flex; justify-content: flex-end; min-height: 38px; }
.sales-order-accounting-open { min-height: 38px; border: 1px solid #287356; border-radius: 4px; padding: 0 16px; background: #287356; color: #fff; font-size: 10px; font-weight: 900; cursor: pointer; }
.sales-order-accounting-open:hover { border-color: #1f6248; background: #1f6248; }
.sales-order-accounting-open:focus-visible { outline: 2px solid #287356; outline-offset: 2px; }
.sales-order-address { grid-template-columns: minmax(250px, 1.15fr) minmax(260px, 1fr); gap: 12px 28px; }
.sales-order-address .sales-order-section-heading { grid-column: 1 / -1; }
.sales-order-address-destination { display: grid; align-content: start; gap: 4px; min-width: 0; border-left: 3px solid #8aa99a; padding: 9px 11px; background: #f7faf8; }
.sales-order-address-destination strong { color: #2b3932; font-size: 11px; }
.sales-order-address-destination span { overflow-wrap: anywhere; color: #53625b; font-size: 10px; line-height: 1.55; }
.sales-order-address-destination.is-office-pickup { gap: 5px; }
.sales-order-address-destination .sales-order-office-pickup-badge { justify-self: start; }
.sales-order-address-destination .sales-order-office-pickup-recipient { color: #2b3932; font-weight: 800; }
.sales-order-address dl { align-content: start; }
.sales-order-shipping-schedule { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(170px, 240px) auto minmax(220px, 1fr); align-items: end; gap: 8px 10px; border-left: 3px solid #287356; padding: 10px 12px; background: #edf7f1; }
.sales-order-shipping-schedule label { display: grid; gap: 5px; color: #205c45; font-size: 10px; font-weight: 800; }
.sales-order-shipping-schedule input { box-sizing: border-box; min-height: 36px; border: 1px solid #9ebcaf; border-radius: 4px; padding: 6px 9px; background: #fff; color: #183d30; font: inherit; font-size: 13px; font-weight: 800; }
.sales-order-shipping-schedule input:focus-visible { outline: 2px solid #287356; outline-offset: 2px; }
.sales-order-shipping-schedule button { min-height: 36px; border: 1px solid #287356; border-radius: 4px; padding: 0 13px; background: #287356; color: #fff; font-size: 10px; font-weight: 800; cursor: pointer; }
.sales-order-shipping-schedule button:disabled { opacity: .55; cursor: wait; }
.sales-order-shipping-schedule small { align-self: center; color: #4d685d; font-size: 9px; line-height: 1.55; }
.sales-order-shipping-schedule-locked { align-self: center; color: #66756e; font-size: 10px; font-weight: 800; }
.sales-order-history-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.sales-order-history-group { min-width: 0; }
.sales-order-history-groups h4 { margin: 0; border-bottom: 2px solid #cfd8df; padding: 0 4px 7px; color: #3f4d5b; font-size: 10px; }
.sales-order-history-empty span { display: block; border-bottom: 1px solid #e1e5e9; padding: 10px 4px; color: #7c8791; font-size: 10px; }
.sales-order-pricing-history { border-top: 0; padding-top: 0; }
.sales-order-history-list { border-bottom: 1px solid #dbe1e6; }
.sales-order-history-row,
.sales-order-pricing-history-row,
.sales-order-shipment-history-row { display: grid; grid-template-columns: 142px 112px minmax(220px, 1fr) minmax(190px, .82fr); align-items: start; gap: 14px; min-width: 0; border-top: 1px solid #e1e5e9; border-bottom: 0; padding: 12px 10px; }
.sales-order-history-row:first-child { border-top: 0; }
.sales-order-history-row time { color: #66727f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sales-order-history-kind-cell,
.sales-order-history-content,
.sales-order-history-result { display: grid; min-width: 0; gap: 3px; }
.sales-order-history-kind { justify-self: start; border: 1px solid #97b8a7; border-radius: 4px; padding: 3px 7px; background: #edf7f1; color: #205f43; font-weight: 800; line-height: 1.35; white-space: nowrap; }
.sales-order-history-kind.pricing { border-color: #b8a370; background: #fff8e8; color: #77560d; }
.sales-order-history-kind.revision { border-color: #9cacc0; background: #f1f5f8; color: #3f5368; }
.sales-order-history-kind.core_return { border-color: #d9a091; background: #fff4f1; color: #934536; }
.sales-order-history-kind-cell .state { justify-self: start; color: #6b7783; font-weight: 700; }
.sales-order-history-content strong,
.sales-order-history-result strong { color: #26352f; line-height: 1.45; overflow-wrap: anywhere; }
.sales-order-history-content small,
.sales-order-history-result small { color: #6f7b86; line-height: 1.45; overflow-wrap: anywhere; }
.sales-order-history-file { word-break: normal; }
.sales-order-pricing-history-row .sales-order-history-result strong { color: #334155; white-space: nowrap; }
.sales-order-shipment-history { border-top: 0; }
.sales-order-shipment-history-row.superseded { opacity: .58; background: #f7f8f9; }

.form-card.sales-order-pricing-card { display: flex; flex-direction: column; overflow: hidden; }
.sales-order-pricing-heading { position: static; flex: 0 0 auto; padding: 15px 20px 13px; }
.sales-order-pricing-note { flex: 0 0 auto; margin: 0; border-left: 0; border-bottom: 1px solid #d8dfe5; padding: 9px 20px; background: #f5f8f6; }
#sales-order-pricing-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px 18px; }
.sales-order-pricing-section { min-width: 0; }
.sales-order-pricing-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sales-order-pricing-section-title > div { display: flex; align-items: center; gap: 7px; }
.sales-order-pricing-section-title > div > span { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 4px; background: #287356; color: #fff; font-size: 10px; font-weight: 900; }
.sales-order-pricing-section-title h4 { margin: 0; color: #263442; font-size: 12px; }
.sales-order-pricing-section-title p { color: #74808b; font-size: 9px; }
.sales-order-pricing-items { border: 1px solid #d8dfe5; }
.sales-order-pricing-item-head,
.sales-order-pricing-item { grid-template-columns: minmax(220px, 1fr) 54px 145px 124px; align-items: center; border-bottom: 1px solid #e1e6eb; padding: 8px 10px; }
.sales-order-pricing-item:last-child { border-bottom: 0; }
.sales-order-pricing-item-head { min-height: 32px; padding-top: 6px; padding-bottom: 6px; }
.sales-order-pricing-item .sales-order-pricing-mobile-label { display: none; }
.sales-order-pricing-quantity strong,
.sales-order-pricing-line-total strong { min-height: 0; padding-top: 0; }
.sales-order-pricing-item input { height: 34px; background: #fff; }
.sales-order-pricing-item input:focus,
.sales-order-pricing-order-fields input:focus,
.sales-order-pricing-adjustment-row input:focus,
.sales-order-pricing-adjustment-row select:focus,
.sales-order-pricing-reason textarea:focus { border-color: #287356; outline: 3px solid rgba(40,115,86,.14); }
.sales-order-pricing-lower-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 14px; margin-top: 15px; }
.sales-order-pricing-adjustments,
.sales-order-pricing-result { border: 1px solid #d8dfe5; padding: 12px; background: #fafbfc; }
.sales-order-pricing-order-fields { grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
.sales-order-pricing-preview { grid-template-columns: 1fr 1fr; margin-top: 0; background: #fff; }
.sales-order-pricing-preview > div { min-width: 0; padding: 8px 9px; }
.sales-order-pricing-preview > div:nth-child(2n) { border-right: 0; }
.sales-order-pricing-preview > div:nth-child(-n+2) { border-bottom: 1px solid #d8dfe5; }
.sales-order-pricing-preview .total { grid-column: 1 / -1; border-top: 1px solid #d8dfe5; border-right: 0; padding-top: 10px; padding-bottom: 10px; }
.sales-order-pricing-preview .total strong { font-size: 17px; }
.sales-order-pricing-reason { margin-top: 15px; }
.sales-order-pricing-reason textarea { min-height: 58px; }
.sales-order-pricing-message { flex: 0 0 auto; }
.sales-order-pricing-card .form-footer { flex: 0 0 auto; }

/* Desktop order workstation: keep search, status, list, and detail in one viewport. */
@media (min-width: 1081px) {
  #screen-sales-order-mgmt.active {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  #screen-sales-order-mgmt .page-header { position: relative; }
  .sales-order-mgmt-body {
    position: relative;
    display: grid;
    grid-template-columns: 255px minmax(0, 1fr);
    grid-template-rows: 80px 54px minmax(0, 1fr);
    overflow: hidden;
  }
  .sales-order-toolbar {
    grid-column: 1 / -1;
    grid-row: 1;
    align-items: center;
    gap: 18px;
    min-height: 0;
    padding: 8px 16px;
  }
  .sales-order-title-block { flex: 0 0 190px; min-width: 0; }
  .sales-order-toolbar h1 { margin-top: 1px; font-size: 19px; line-height: 1.15; }
  .sales-order-toolbar p { display: none; }
  .sales-order-filter-row {
    flex: 1 1 auto;
    grid-template-columns: auto minmax(300px, 1fr) auto auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }
  .sales-order-search-controls { grid-template-columns: minmax(150px, 1fr) 112px auto; }
  .sales-order-filter-row input,
  .sales-order-filter-row select,
  .sales-order-filter-row button { height: 34px; min-height: 34px; }
  .sales-order-filter-row button { padding-right: 8px; padding-left: 8px; font-size: 9px; }
  .sales-order-selection-controls { gap: 5px; padding-left: 6px; }
  .sales-order-selection-summary { min-width: 52px; padding: 0 5px; font-size: 8px; }
  .sales-order-data-actions > summary { min-height: 34px; padding: 0 9px; font-size: 9px; }
  .sales-order-data-actions > div button { height: auto; }
  .sales-order-batch-message { min-height: 10px; font-size: 8px; line-height: 1.2; }
  .sales-order-batch-message:empty { display: none; }
  .sales-order-b2-import:not([hidden]) {
    position: absolute;
    z-index: 12;
    top: 80px;
    right: 16px;
    left: 16px;
    max-height: calc(100% - 96px);
    overflow: auto;
    border: 1px solid #bdc9c2;
    box-shadow: 0 14px 28px rgba(27, 43, 35, .18);
  }
  .sales-order-auto-print {
    grid-column: 1;
    grid-row: 2;
    min-height: 54px;
    border-right: 1px solid #cfd8d3;
    padding: 6px 12px;
  }
  .sales-order-auto-print-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .sales-order-auto-print-heading > strong { font-size: 10px; line-height: 1.25; }
  .sales-order-auto-print-state { min-height: 18px; padding: 0 5px; font-size: 8px; }
  .sales-order-print-settings-button { min-height: 28px; padding: 0 8px; font-size: 9px; }
  .sales-order-dashboard {
    grid-column: 2;
    grid-row: 2;
    gap: 10px;
    min-width: 0;
    min-height: 54px;
    padding: 5px 12px;
  }
  .sales-order-dashboard-heading { min-width: 68px; }
  .sales-order-dashboard-heading strong { font-size: 10px; }
  .sales-order-dashboard-heading span { display: none; }
  .sales-order-dashboard-metrics { gap: 5px; }
  .sales-order-dashboard-metric { min-height: 38px; padding: 4px 7px; }
  .sales-order-dashboard-metric span { font-size: 8px; }
  .sales-order-dashboard-metric strong { font-size: 16px; }
  .sales-order-workspace {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 0;
    overflow: hidden;
  }
  .sales-order-list-pane { display: flex; flex-direction: column; overflow: hidden; }
  .sales-order-list-head { flex: 0 0 38px; height: 38px; }
  .sales-order-list { flex: 1 1 auto; height: auto; min-height: 0; overscroll-behavior: contain; }
  .sales-order-list-row { min-height: 78px; padding: 8px 10px; }
  .sales-order-detail-pane {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 18px 18px;
    overscroll-behavior: contain;
  }
  .sales-order-detail-head { grid-template-columns: minmax(165px, .68fr) minmax(250px, 1.1fr) auto; min-height: 78px; padding: 8px 0; }
  .sales-order-detail-head h2 { margin-top: 1px; font-size: 20px; line-height: 1.15; }
  .sales-order-detail-head strong { margin-top: 2px; }
  .sales-order-progress { align-self: center; }
  .sales-order-progress-step { grid-template-columns: 17px minmax(0, 1fr); gap: 3px; padding-right: 2px; padding-left: 2px; }
  .sales-order-progress-step > span { width: 16px; height: 16px; font-size: 7px; }
  .sales-order-progress-step > strong { font-size: 7px; }
  .sales-order-detail-state { gap: 8px; }
  .sales-order-detail-next-actions { padding-left: 10px; }
  .sales-order-detail-next-actions .sales-order-action { min-height: 30px; padding: 0 9px; font-size: 9px; }
  .sales-order-detail-nav { min-height: 36px; }
  .sales-order-detail-nav button { min-height: 36px; padding: 0 12px; font-size: 9px; }
  .sales-order-detail-panels { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .sales-order-detail-panel { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 1px 16px; }
  .sales-order-detail-overview { overflow: hidden; }
  .sales-order-detail-overview-grid { grid-template-columns: minmax(490px, 1.45fr) minmax(275px, .85fr); align-items: start; height: 100%; gap: 14px; }
  .sales-order-detail-overview-grid > .sales-order-detail-section { min-width: 0; margin-top: 0; padding: 12px 0 0; }
  .sales-order-detail-overview-grid > .sales-order-detail-section:first-child { border-right: 1px solid #dbe1e6; padding-right: 14px; }
  .sales-order-detail-overview-grid .sales-order-section-heading p { display: none; }
  .sales-order-detail-overview-grid .sales-order-item-head,
  .sales-order-detail-overview-grid .sales-order-item-row { grid-template-columns: minmax(150px, 1.5fr) 78px 44px 82px 90px; min-width: 0; gap: 7px; padding: 8px 7px; }
  .sales-order-detail-overview-grid .sales-order-address { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 10px; padding-top: 12px; }
  .sales-order-detail-overview-grid .sales-order-address .sales-order-section-heading { grid-column: 1; }
  .sales-order-detail-overview-grid .sales-order-address dl { gap: 7px; }
  .sales-order-detail-overview-grid .sales-order-address dl > div { grid-template-columns: 76px minmax(0, 1fr); }
  .sales-order-detail-overview-grid .sales-order-shipping-schedule { grid-template-columns: minmax(145px, 1fr) auto; }
  .sales-order-detail-overview-grid .sales-order-shipping-schedule small { grid-column: 1 / -1; }
  .sales-order-detail-section { margin-top: 14px; }
}

@media (min-width: 1081px) and (max-width: 1199px) {
  .sales-order-detail-overview { overflow-y: auto; }
  .sales-order-detail-overview-grid { grid-template-columns: minmax(0, 1fr); height: auto; }
}

/* Desktop shipping-document workstation: keep the complete issue flow in one viewport. */
@media (min-width: 1081px) {
  #screen-shipping-document-mgmt.active {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  #screen-shipping-document-mgmt .page-header { position: relative; }
  .shipping-document-mgmt-body { overflow: hidden; }
  .shipping-document-toolbar {
    flex: 0 0 auto;
    align-items: center;
    gap: 18px;
    min-height: 86px;
    padding: 9px 16px;
  }
  .shipping-document-title-block {
    display: grid;
    flex: 1 1 380px;
    grid-template-columns: minmax(190px, 1fr) auto;
    grid-template-areas:
      "kicker actions"
      "title actions"
      "copy actions";
    align-items: center;
    column-gap: 12px;
    min-width: 360px;
  }
  .shipping-document-title-block .sales-order-kicker { grid-area: kicker; }
  .shipping-document-title-block h1 { grid-area: title; margin-top: 1px; font-size: 20px; line-height: 1.15; }
  .shipping-document-title-block p { grid-area: copy; margin-top: 2px; font-size: 9px; line-height: 1.35; }
  #screen-shipping-document-mgmt .shipping-document-title-actions {
    grid-area: actions;
    display: grid;
    gap: 5px;
    margin-top: 0;
  }
  #screen-shipping-document-mgmt .shipping-document-title-actions a,
  #screen-shipping-document-mgmt .shipping-document-title-actions button {
    min-height: 30px;
    padding: 4px 10px;
    font-size: 10px;
    white-space: nowrap;
  }
  .shipping-document-lookup { flex: 0 1 820px; width: auto; }
  .shipping-document-filter-row input,
  .shipping-document-filter-row select,
  .shipping-document-filter-row > button { height: 34px; }
  .shipping-document-lookup-message { min-height: 12px; margin-top: 2px; line-height: 1.25; }
  .shipping-document-workspace { min-height: 0; }
  .shipping-document-list-head { height: 38px; }
  .shipping-document-list-row { min-height: 74px; padding: 7px 10px; }
  .shipping-document-batch-panel { padding: 8px 10px 7px; }
  .shipping-document-batch-default-note { margin-top: 3px; padding-top: 2px; padding-bottom: 2px; line-height: 1.3; }
  .shipping-document-batch-types { gap: 3px 8px; margin: 5px 0; }
  .shipping-document-batch-panel > button { min-height: 30px; }
  .shipping-document-batch-panel > p { min-height: 10px; margin-top: 3px; line-height: 1.2; }
  .shipping-document-detail-pane { overflow-y: auto; padding: 11px 18px 14px; }
  .shipping-document-detail-head { align-items: center; padding-bottom: 8px; }
  .shipping-document-detail-head h2 { margin-top: 1px; font-size: 20px; line-height: 1.15; }
  .shipping-document-detail-target { margin-top: 1px; }
  .shipping-document-detail-head strong { margin-top: 2px; }
  .shipping-document-stages > div { padding: 6px 10px; }
  .shipping-document-stages strong { margin-top: 2px; }
  .shipping-document-order-contents { padding: 6px 0; }
  .shipping-document-order-contents-head { margin-bottom: 3px; }
  .shipping-document-order-item { min-height: 36px; padding: 3px 7px; }
  .shipping-document-section { margin-top: 9px; padding-top: 7px; }
  .shipping-document-section-head { align-items: center; margin-bottom: 6px; }
  .shipping-document-section-head h3 { font-size: 12px; }
  .shipping-document-required-documents .shipping-document-section-head p { display: none; }
  .shipping-document-guidance { padding: 5px 8px; font-size: 9px; line-height: 1.35; }
  .shipping-document-required-head,
  .shipping-document-required-row {
    grid-template-columns: minmax(150px, .75fr) minmax(190px, 1.05fr) minmax(145px, .78fr) minmax(200px, auto);
    gap: 10px;
  }
  .shipping-document-required-head { min-height: 28px; padding: 0 8px; }
  .shipping-document-required-row { min-height: 52px; padding: 4px 8px; }
  .shipping-document-required-row button { min-height: 28px; padding: 0 9px; }
  .shipping-document-name-cell { gap: 3px; }
  .shipping-document-required-row .shipping-carrier-brand.compact { height: 27px; }
  .shipping-document-required-row .shipping-carrier-brand.compact .shipping-carrier-logo { height: 20px; }
}

@media (max-width: 1080px) {
  .customer-order-workspace { grid-template-columns: minmax(0, 1fr) 330px; }
  .customer-order-line { gap: 10px; }
  .sales-order-toolbar { align-items: stretch; flex-direction: column; }
  .sales-order-filter-row { grid-template-columns: minmax(0, 1fr) auto; }
  .sales-order-search-controls { grid-column: 1 / -1; }
  .sales-order-selection-controls { border-left: 0; padding-left: 0; }
  .sales-order-secondary-actions { justify-self: end; }
  .sales-order-auto-print { grid-template-columns: 1fr; }
  .sales-order-auto-print-message { grid-column: 1; }
  .sales-order-dashboard { grid-template-columns: 1fr; gap: 6px; }
  .sales-order-workspace { grid-template-columns: 360px minmax(0, 1fr); }
  .shipping-document-toolbar { align-items: stretch; flex-direction: column; }
  .shipping-document-lookup { flex: 0 0 auto; width: 100%; }
  .shipping-document-filter-row { grid-template-columns: minmax(180px, 1fr) 128px 150px 118px 118px auto; }
  .shipping-document-workspace { grid-template-columns: 330px minmax(0, 1fr); }
  .shipping-document-waybill-form { grid-template-columns: 1fr 1fr; }
  .sales-order-list-row { grid-template-columns: 22px minmax(0, 1fr); }
  .sales-order-list-metrics { grid-column: 2; }
  .sales-order-detail-head { grid-template-columns: minmax(170px, 1fr) auto; }
  .sales-order-progress { grid-column: 1 / -1; grid-row: 2; }
  .sales-order-detail-state { align-items: flex-end; }
  .sales-order-detail-next-actions { border-left: 0; padding-left: 0; }
  .sales-order-tracking-grid { grid-template-columns: 1fr 1fr; }
  .sales-accounting-export-workspace { grid-template-columns: minmax(0, 1fr) 270px; }
}
@media (max-width: 820px) {
  .customer-catalog-order-link { min-height: 30px; padding: 0 9px; font-size: 10px; }
  .customer-order-heading { align-items: stretch; flex-direction: column; }
  .customer-order-workspace { grid-template-columns: 1fr; width: min(100% - 24px, 1080px); }
  .customer-order-cart-pane { border-right: 1px solid var(--dcats-border); border-radius: var(--dcats-card-radius) var(--dcats-card-radius) 0 0; }
  .customer-order-shipping-pane { position: static; border-top: 0; border-radius: 0 0 var(--dcats-card-radius) var(--dcats-card-radius); }
  .customer-order-history-row { grid-template-columns: 1fr 1fr; }
  .sales-order-workspace { grid-template-columns: 1fr; }
  .sales-order-dashboard { padding: 8px 12px; }
  .sales-order-dashboard-metrics { display: flex; overflow-x: auto; padding-bottom: 3px; }
  .sales-order-dashboard-metric { flex: 0 0 104px; }
  .sales-order-list-pane { border-right: 0; border-bottom: 7px solid #e4e8ec; }
  .sales-order-list { max-height: 42vh; }
  .sales-order-item-table { overflow-x: auto; }
  .sales-order-item-head,
  .sales-order-item-row { min-width: 690px; }
  .sales-order-detail-nav { overflow-x: auto; }
  .sales-order-detail-nav button { flex: 1 0 auto; justify-content: center; }
  .sales-order-detail-panel { padding-top: 12px; }
  .sales-order-history-groups { grid-template-columns: 1fr; }
  .sales-order-pricing-lower-grid { grid-template-columns: 1fr; }
  .sales-accounting-sales-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-accounting-sales-steps li:nth-child(2n) { border-right: 0; }
  .sales-accounting-sales-steps li:nth-child(-n+2) { border-bottom: 1px solid #d9e3dd; }
  .sales-accounting-export-workspace { grid-template-columns: 1fr; overflow: auto; }
  .sales-accounting-export-candidates { min-height: 280px; border-right: 0; border-bottom: 6px solid #e4e8ec; }
  .sales-accounting-export-history { min-height: 240px; }
  .sales-accounting-export-order { grid-template-columns: minmax(0, 1fr) auto; min-width: 0; }
  .sales-accounting-export-order-simple { grid-template-columns: minmax(0, 1fr) auto; }
  .sales-accounting-export-order > .sales-accounting-export-code-block,
  .sales-accounting-export-product-list,
  .sales-accounting-export-issues { grid-column: 1 / -1; }
  .sales-accounting-export-order-simple .sales-accounting-export-order-products { grid-column: 1 / -1; }
  .sales-accounting-export-total { grid-column: 2; grid-row: 1; }
  .shipping-document-workspace { grid-template-columns: 1fr; overflow: visible; }
  .shipping-document-filter-row { grid-template-columns: minmax(0, 1fr) 1fr 1fr; }
  .shipping-document-filter-row > input:first-child { grid-column: 1 / -1; }
  .shipping-document-list-pane { border-right: 0; border-bottom: 7px solid #e4e8ec; }
  .shipping-document-list { max-height: 38vh; }
  .shipping-document-batch-panel { border-bottom: 1px solid #d5dbe1; }
  .shipping-document-detail-pane { overflow: visible; }
  .shipping-document-stages { grid-template-columns: 1fr 1fr; }
  .shipping-document-stages > div:nth-child(2) { border-right: 0; }
  .shipping-document-default-head,
  .shipping-document-required-head { display: none; }
  .shipping-document-default-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 5px 12px; }
  .shipping-document-default-row small { grid-column: 1 / -1; }
  .shipping-document-required-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .shipping-document-required-row > .shipping-document-row-actions { grid-column: 1 / -1; justify-self: stretch; }
  .shipping-document-row-actions button { flex: 1; }
}
@media (max-width: 560px) {
  .customer-portal-order-button { width: 100%; }
  .customer-order-development-preview-copy { align-items: flex-start; flex-direction: column; gap: 5px; }
  .customer-order-postal-test-head { align-items: flex-start; flex-direction: column; gap: 2px; }
  .customer-order-postal-test-head span { text-align: left; }
  .customer-order-cart-pane,
  .customer-order-shipping-pane { padding: 15px; }
  .customer-order-line { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #customer-order-cart-list .customer-order-product { grid-column: 1 / -1; padding-right: 84px; }
  #customer-order-cart-list .customer-order-remove { grid-column: 2; grid-row: 1; align-self: start; }
  #customer-order-cart-list .customer-order-qty { grid-column: 1; grid-row: 2; }
  #customer-order-cart-list .customer-order-line > .product-price { grid-column: 2; grid-row: 2; text-align: right; }
  #customer-order-cart-list .customer-order-line > .core-charge { grid-column: 1; grid-row: 3; text-align: left; }
  #customer-order-cart-list .customer-order-line > .total { grid-column: 2; grid-row: 3; text-align: right; }
  .customer-order-line-metric strong { font-size: 13px; }
  .customer-order-preview-summary { grid-template-columns: 1fr 1fr; }
  .customer-order-preview-summary > div:nth-child(2) { border-right: 0; }
  .customer-order-vehicle-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .customer-order-vehicle-heading span { text-align: left; }
  .customer-order-form-grid { grid-template-columns: 1fr; }
  .customer-order-form-grid label.wide { grid-column: 1; }
  .customer-order-yamato-office-panel { grid-template-columns: 1fr; }
  .customer-order-yamato-office-picker { grid-template-columns: 1fr; }
  .customer-order-yamato-office-custom-button { width: 100%; }
  .customer-order-yamato-office-custom-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .customer-order-yamato-office-custom-heading a { white-space: normal; }
  .customer-order-yamato-office-custom-grid { grid-template-columns: 1fr; }
  .customer-order-vehicle-summary dl { grid-template-columns: 1fr; }
  .customer-order-shipping-method { grid-template-columns: 1fr; }
  .customer-order-shipping-method > select,
  .customer-order-shipping-method > small { grid-column: 1; grid-row: auto; }
  .customer-order-address-book-head { align-items: stretch; flex-direction: column; }
  .customer-order-address-book-head .customer-order-secondary-button { width: 100%; }
  .customer-order-address-result { grid-template-columns: 1fr; }
  .customer-order-address-result span { margin-top: 2px; }
  .customer-order-submit-actions { grid-template-columns: 1fr; }
  .customer-order-history-row { grid-template-columns: 1fr; }
  .customer-order-history-total { text-align: left; }
  .customer-order-history-detail-totals { overflow-x: auto; justify-content: flex-start; }
  .customer-order-history-detail-totals > div { flex: 0 0 104px; }
  .sales-order-toolbar { padding: 16px 12px; }
  .sales-order-filter-row { grid-template-columns: 1fr; }
  .sales-order-search-controls { grid-template-columns: 1fr 1fr; }
  .sales-order-search-controls input { grid-column: 1 / -1; }
  .sales-order-search-controls button { width: 100%; }
  .sales-order-selection-controls { display: grid; grid-template-columns: auto 1fr 1fr; width: 100%; }
  .sales-order-selection-controls button { width: 100%; }
  .sales-order-data-actions { justify-self: stretch; }
  .sales-order-data-actions > summary { width: 100%; }
  .sales-order-data-actions > div { right: auto; left: 0; width: 100%; }
  .sales-order-b2-preflight { grid-template-columns: 1fr 30px; gap: 10px; padding: 12px; }
  .sales-order-b2-preflight-errors { grid-column: 1 / -1; }
  .sales-order-b2-preflight-close { grid-column: 2; grid-row: 1; }
  .sales-order-b2-settings-grid { grid-template-columns: 1fr; padding: 14px 14px 10px; }
  .sales-order-b2-settings-grid label.wide { grid-column: 1; }
  .sales-order-b2-settings-heading,
  .sales-order-postal-settings-heading,
  .sales-order-postal-settings-card .form-footer,
  .sales-order-b2-settings-card .form-footer { padding-right: 14px; padding-left: 14px; }
  .sales-order-postal-settings-card .customer-order-postal-test { margin-right: 14px; margin-left: 14px; }
  .sales-order-b2-settings-help { margin-right: 14px; margin-left: 14px; }
  .sales-accounting-export-filter { grid-template-columns: 1fr 1fr; padding: 12px 14px; }
  .sales-accounting-export-filter > label:first-child,
  .sales-accounting-export-filter > button { grid-column: 1 / -1; }
  .sales-accounting-export-order-context { align-items: flex-start; flex-direction: column; gap: 2px; padding: 9px 14px; }
  .sales-accounting-export-included { grid-column: 1 / -1; }
  .sales-accounting-export-directory { align-items: stretch; flex-direction: column; padding: 10px 14px; }
  .sales-accounting-export-directory > div { justify-content: space-between; }
  .sales-accounting-export-directory > div:first-child { align-items: flex-start; flex-flow: column nowrap; gap: 3px; }
  .form-card.sales-accounting-export-card { height: calc(100vh - 24px); }
  .sales-accounting-export-workspace { min-height: 0; }
  .sales-accounting-export-candidates { min-height: 240px; }
  .sales-accounting-export-history { min-height: 180px; }
  .sales-accounting-export-heading { padding: 14px; }
  .sales-accounting-export-summary { padding: 9px 14px; }
  .sales-accounting-sales-guide > summary,
  .sales-accounting-troubleshooting-guide > summary { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding: 10px 14px; }
  .sales-accounting-sales-guide > summary > small,
  .sales-accounting-troubleshooting-guide > summary > small { grid-column: 2; text-align: left; }
  .sales-accounting-sales-guide-body,
  .sales-accounting-troubleshooting-body { padding: 10px 14px 12px; }
  .sales-accounting-sales-steps { grid-template-columns: 1fr; }
  .sales-accounting-sales-steps li,
  .sales-accounting-sales-steps li:nth-child(-n+2) { border-right: 0; border-bottom: 1px solid #d9e3dd; }
  .sales-accounting-sales-steps li:last-child { border-bottom: 0; }
  .sales-accounting-troubleshooting-list > div { grid-template-columns: 1fr; }
  .sales-accounting-troubleshooting-list dd { border-top: 1px solid #eee3e1; border-left: 0; }
  .sales-accounting-hanbaiou-guide > summary { align-items: flex-start; flex-wrap: wrap; padding: 10px 14px; }
  .sales-accounting-hanbaiou-guide-body { max-height: 58vh; overflow-y: auto; padding: 10px 14px 12px; }
  .sales-accounting-hanbaiou-steps { grid-template-columns: 1fr; }
  .sales-accounting-hanbaiou-utility { align-items: stretch; flex-direction: column; }
  .sales-accounting-hanbaiou-utility button { width: 100%; }
  .sales-accounting-export-section-head { align-items: flex-start; flex-direction: column; }
  .sales-accounting-export-footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; padding: 12px 14px; }
  .sales-accounting-export-footer button { width: 100%; min-width: 0; }
  .sales-order-auto-print { padding: 12px; }
  .sales-order-auto-print-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .sales-order-auto-print-controls { grid-template-columns: 1fr; }
  .sales-order-auto-print-toggle { white-space: normal; }
  .sales-order-print-settings-current { grid-template-columns: 1fr; }
  .sales-order-print-settings-current > div { border-right: 0; border-bottom: 1px solid #d8dfdb; }
  .sales-order-print-settings-current > div:last-child { border-bottom: 0; }
  .sales-order-detail-pane { padding: 18px 12px 36px; }
  .sales-order-detail-head { grid-template-columns: 1fr; align-items: stretch; }
  .sales-order-progress { grid-column: 1; grid-row: auto; }
  .sales-order-detail-state { align-items: flex-start; flex-direction: column; }
  .sales-order-detail-next-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .sales-order-detail-next-actions > div { justify-content: stretch; }
  .sales-order-detail-next-actions .sales-order-action { flex: 1; }
  .sales-order-secondary-actions { width: 100%; }
  .sales-order-secondary-actions > summary { width: 100%; }
  .sales-order-secondary-actions > div { position: static; width: 100%; margin-top: 5px; }
  .sales-order-section-heading { align-items: stretch; flex-direction: column; }
  .sales-order-pricing-open { width: 100%; }
  .sales-order-pricing-history-row { grid-template-columns: 1fr; gap: 4px; }
  .sales-order-pricing-history-row span { white-space: normal; }
  .form-card.sales-order-pricing-card { max-height: calc(100vh - 18px); }
  .sales-order-pricing-heading { padding: 14px; }
  .sales-order-pricing-note { margin: 12px 14px 0; }
  #sales-order-pricing-content { padding: 14px 14px 4px; }
  .sales-order-pricing-item-head { display: none; }
  .sales-order-pricing-item { grid-template-columns: 1fr 1fr; align-items: end; gap: 9px 10px; padding: 12px 4px; }
  .sales-order-pricing-product { grid-column: 1 / -1; }
  .sales-order-pricing-item .sales-order-pricing-mobile-label { display: block; }
  .sales-order-pricing-quantity { grid-column: 1; }
  .sales-order-pricing-line-total { grid-column: 2; }
  .sales-order-pricing-adjustment-row { grid-template-columns: 1fr 1fr; }
  .sales-order-pricing-adjustment-row label:nth-child(3) { grid-column: 1 / -1; }
  .sales-order-pricing-adjustment-row button { grid-column: 1 / -1; width: 100%; }
  .sales-order-pricing-order-fields { grid-template-columns: 1fr; }
  .sales-order-pricing-preview { grid-template-columns: 1fr 1fr; }
  .sales-order-pricing-preview > div:nth-child(even) { border-right: 0; }
  .sales-order-pricing-preview .total { grid-column: 1 / -1; }
  .sales-order-pricing-message { margin: 0 14px; text-align: left; }
  .sales-order-pricing-card .form-footer { align-items: stretch; flex-direction: column; padding: 12px 14px; }
  .sales-order-pricing-card .form-footer button { width: 100%; min-height: 42px; }
  .sales-order-address { grid-template-columns: 1fr; }
  .sales-order-address .sales-order-section-heading { grid-column: 1; }
  .sales-order-shipping-schedule { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .sales-order-shipping-schedule button { width: 100%; }
  .sales-order-shipping-schedule small { grid-column: 1; }
  .sales-order-tracking-grid { grid-template-columns: 1fr; }
  .sales-order-dispatch-head { flex-direction: column; }
  .sales-order-dispatch-summary { grid-template-columns: 1fr 1fr; }
  .sales-order-dispatch-summary > div:nth-child(2) { border-right: 0; }
  .sales-order-waybill-progress-grid { grid-template-columns: 1fr; }
  .sales-order-waybill-progress-editor .sales-order-tracking-grid { grid-template-columns: 1fr; }
  .sales-order-carrier-tracking-row { justify-content: stretch; }
  .sales-order-carrier-tracking { width: 100%; min-height: 40px; }
  .sales-order-dispatch-actions { align-items: stretch; flex-direction: column; }
  .sales-order-dispatch-actions button { width: 100%; }
  .sales-order-print-jobs-head { align-items: stretch; flex-direction: column; }
  .sales-order-print-jobs-head button { width: 100%; }
  .sales-order-print-job { grid-template-columns: minmax(0, 1fr) auto; }
  .sales-order-print-job > time { grid-column: 1 / -1; }
  .sales-order-shipment-history-row { grid-template-columns: 74px minmax(0, 1fr); }
  .sales-order-shipment-history-row .state { justify-self: start; }
  .sales-order-detail-actions { align-items: stretch; flex-direction: column; }
  .sales-order-in-house-cancel-summary { grid-template-columns: 1fr; }
  .sales-order-in-house-cancel-summary > div,
  .sales-order-in-house-cancel-summary > div:nth-child(2n),
  .sales-order-in-house-cancel-summary > div:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid #d8dfe6; }
  .sales-order-in-house-cancel-summary > div:last-child { border-bottom: 0; }
  .sales-order-in-house-cancel-card .form-footer { align-items: stretch; flex-direction: column; }
  .sales-order-in-house-cancel-card .form-footer button { width: 100%; min-height: 42px; white-space: normal; }
  .shipping-document-toolbar { padding: 16px 12px; }
  .shipping-document-filter-row { grid-template-columns: 1fr; }
  .shipping-document-list-row { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .shipping-document-list-meta { grid-column: 2; text-align: left; }
  .shipping-document-list-row .sales-order-status { grid-column: 3; grid-row: 1 / 3; justify-self: end; }
  .shipping-document-detail-pane { padding: 18px 12px 36px; }
  .shipping-document-detail-head,
  .shipping-document-section-head { align-items: stretch; flex-direction: column; }
  .shipping-document-section-head button { width: 100%; }
  .shipping-document-b2-row { grid-template-columns: 1fr; }
  .shipping-document-b2-row button { width: 100%; }
  .shipping-document-print-actions,
  .shipping-document-print-state { align-items: stretch; flex-direction: column; }
  .shipping-document-print-actions button { width: 100%; }
  .shipping-document-waybill-form { grid-template-columns: 1fr; }
  .shipping-document-waybill-print-row { align-items: stretch; flex-direction: column; }
  .shipping-document-waybill-print-row > div { margin-right: 0; }
  .shipping-document-waybill-print-row button,
  .shipping-document-waybill-print-row a { width: 100%; }
  .shipping-document-order-item { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; }
  .shipping-document-delivery-grid { grid-template-columns: 1fr; }
  .shipping-document-delivery-facts { border-top: 1px solid #dbe1e6; border-left: 0; }
  .shipping-document-order-kind { justify-self: end; }
  .shipping-document-order-quantity { grid-column: 1; }
  .shipping-document-order-core { grid-column: 2; justify-self: end; }
  .shipping-document-default-row { grid-template-columns: 1fr; }
  .shipping-document-default-row small { grid-column: 1; }
  .shipping-document-settings-heading { padding: 16px 14px 12px; }
  #shipping-document-settings-content { padding: 14px; }
  .shipping-document-settings-card .shipping-document-waybill-form { grid-template-columns: 1fr; }
  .shipping-document-settings-card .shipping-document-waybill-form > label:last-of-type,
  .shipping-document-settings-card .shipping-document-waybill-form > button { grid-column: 1; width: 100%; }
  .shipping-document-temporary-setting-actions { align-items: stretch; flex-direction: column; }
  .shipping-document-temporary-setting-actions a,
  .shipping-document-temporary-setting-actions button { width: 100%; }
  .shipping-document-settings-card .sales-order-detail-message { margin: 0 14px; }
  .shipping-document-settings-card .form-footer { padding: 12px 14px; }
  .form-card.shipping-document-b2-reissue-card { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .shipping-document-b2-reissue-heading { padding: 15px 14px 12px; }
  .shipping-document-b2-reissue-heading h3 { font-size: 18px; }
  .shipping-document-b2-reissue-summary { grid-template-columns: 1fr; }
  .shipping-document-b2-reissue-summary > div { border-right: 0; border-bottom: 1px solid #d8dfdb; padding: 9px 14px; }
  .shipping-document-b2-reissue-summary > div:last-child { border-bottom: 0; }
  .shipping-document-b2-reissue-reason-section { padding: 14px 14px 7px; }
  .shipping-document-b2-reissue-reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shipping-document-b2-reissue-reasons button { min-height: 68px; }
  .shipping-document-b2-reissue-redownload { align-items: stretch; flex-direction: column; margin: 0 14px 14px; }
  .shipping-document-b2-reissue-redownload button { width: 100%; }
  .shipping-document-b2-reissue-footer { grid-template-columns: 1fr 1fr; padding: 12px 14px; }
  .shipping-document-b2-reissue-footer p { grid-column: 1 / -1; }
  .shipping-document-b2-reissue-footer button,
  .shipping-document-b2-reissue-footer .btn-primary { width: 100%; min-width: 0; }
}
.product-media-switch {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid #d8e2f1;
  border-radius: 12px;
  background: #f5f8fc;
}
.product-media-switch-btn {
  min-height: 34px;
  padding: 6px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #60708d;
  font-weight: 800;
  cursor: pointer;
}
.product-media-switch-btn.active { background: #fff; color: #174ea6; box-shadow: 0 2px 8px rgba(27, 57, 99, .12); }
.image-action-btn.model { border-color: #8bd7d2; color: #087f75; background: #f0fdfa; }
.product-3d-cube {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 5px;
  border-radius: 9px;
  background: linear-gradient(145deg, #0f766e, #2563eb);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.product-3d-capture-overlay, .product-3d-viewer-overlay { z-index: 620; padding: 16px; background: rgba(7, 18, 33, .78); backdrop-filter: blur(5px); }
.product-3d-tripo-overlay { z-index: 625; padding: 16px; background: rgba(7, 18, 33, .78); }
.product-3d-viewer-overlay { z-index: 630; }
.product-3d-tripo-shell { width: min(860px, 100%); max-height: min(92dvh, 920px); overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 20px 70px rgba(0,0,0,.35); }
.product-3d-tripo-body { padding: 18px; display: grid; gap: 14px; }
.product-3d-tripo-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 360px; overflow: auto; }
.product-3d-tripo-images figure { margin: 0; border: 1px solid #d7e0ec; border-radius: 10px; padding: 6px; text-align: center; }
.product-3d-tripo-images button { width: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.product-3d-tripo-images button:focus-visible { outline: 2px solid #2459a6; outline-offset: 3px; }
.product-3d-tripo-images .product-3d-tripo-photo-directions button,
.product-3d-tripo-photo-directions button { width: auto; min-height: 36px; padding: 6px 8px; border: 1px solid #b9c8db; border-radius: 6px; background: #fff; cursor: pointer; font-size: 12px; }
.product-3d-tripo-photo-directions { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 8px; }
.product-3d-tripo-photo-directions button[aria-pressed="true"] { border-color: #2459a6; background: #eaf2ff; color: #173e78; }
.product-3d-tripo-assigned-label { display: block; min-height: 18px; color: #2459a6; font-size: 12px; }
.product-3d-tripo-kind { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.product-3d-tripo-kind select { min-width: 150px; padding: 8px; border: 1px solid #b9c8db; border-radius: 8px; }
.product-3d-tripo-number-choices summary { cursor: pointer; color: #2459a6; font-size: 13px; }
.product-3d-tripo-number-choices[open] .product-3d-tripo-views { margin-top: 8px; }
.product-3d-tripo-selection { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.product-3d-tripo-preset { margin-bottom: 12px; min-width: 0; }
.product-3d-tripo-preset[hidden] { display: none; }
.product-3d-tripo-preset button { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.product-3d-tripo-selection figure { margin: 0; min-width: 0; border: 1px solid #b9c8db; border-radius: 10px; padding: 8px; text-align: center; }
.product-3d-tripo-selection figcaption { display: grid; gap: 4px; font-size: 12px; overflow-wrap: anywhere; }
.product-3d-tripo-selection img { display: block; width: 100%; height: 90px; object-fit: contain; margin: 6px 0; }
.product-3d-tripo-selection-placeholder { display: grid; place-items: center; min-height: 90px; color: #52657e; background: #f5f7fa; margin: 6px 0; font-size: 12px; }
.product-3d-prepared-inputs[hidden] { display: none; }
.product-3d-fal-selection[hidden], .product-3d-fal-large[hidden] { display: none; }
.product-3d-fal-selection { border: 2px solid #6450ae; border-radius: 12px; padding: 14px; min-width: 0; display: grid; gap: 12px; background: #faf9ff; }
.product-3d-fal-selection h3, .product-3d-fal-selection p { margin: 0; line-height: 1.6; }
.product-3d-fal-selection p { font-size: 13px; overflow-wrap: anywhere; }
.product-3d-fal-selected { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.product-3d-fal-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; max-height: 520px; overflow: auto; padding: 4px; }
.product-3d-fal-selection figure { margin: 0; min-width: 0; border: 1px solid #c9c5dd; border-radius: 8px; padding: 8px; text-align: center; background: #fff; }
.product-3d-fal-selection img { display: block; width: 100%; height: 130px; object-fit: contain; }
.product-3d-fal-selection figcaption { font-size: 12px; margin: 6px 0; }
.product-3d-fal-selection button { min-height: 36px; min-width: 0; border: 1px solid #b4accf; border-radius: 6px; color: #35235f; background: #fff; padding: 6px 8px; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.product-3d-fal-selection button:disabled { opacity: .55; cursor: default; }
.product-3d-fal-selection button:focus-visible { outline: 3px solid #51328d; outline-offset: 2px; }
.product-3d-fal-selection button[aria-pressed="true"] { color: #fff; background: #51328d; }
.product-3d-fal-gallery [data-fal-expand] { width: 100%; cursor: zoom-in; }
.product-3d-fal-photo-directions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.product-3d-fal-status { color: #35235f; }
.product-3d-fal-large { border: 1px solid #b4accf; padding: 10px; border-radius: 8px; background: #fff; }
.product-3d-fal-large > div:first-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.product-3d-fal-large img { height: min(60dvh, 520px); margin: 10px 0; }
@media (max-width: 620px) { .product-3d-fal-selection { padding: 10px; } .product-3d-fal-selected { grid-template-columns: repeat(2, minmax(0, 1fr)); } .product-3d-fal-gallery { grid-template-columns: minmax(0, 1fr); } }
.product-3d-prepared-inputs { border: 1px solid #b9c8db; border-radius: 10px; padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 10px; }
.product-3d-prepared-inputs button { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.product-3d-prepared-inputs p { margin: 0; font-size: 13px; line-height: 1.6; }
.product-3d-prepared-inputs label { display: grid; gap: 6px; min-width: 0; }
.product-3d-prepared-inputs input { max-width: 100%; }
.product-3d-prepared-inputs .product-3d-tripo-selection img { height: 180px; }
.product-3d-tripo-selection button { padding: 4px 8px; border: 1px solid #b9c8db; border-radius: 6px; background: #fff; cursor: pointer; }
.product-3d-tripo-images img { width: 100%; height: 100px; object-fit: contain; }
.product-3d-tripo-image-preview[hidden] { display: none; }
.product-3d-tripo-image-preview { border: 1px solid #b9c8db; border-radius: 10px; padding: 10px; text-align: center; }
.product-3d-tripo-image-preview > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.product-3d-tripo-image-preview img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.product-3d-tripo-views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.product-3d-tripo-choice-title { margin: 0; font-size: 16px; color: #234664; }
.product-3d-tripo-views label { display: grid; gap: 5px; font-weight: 600; }
.product-3d-tripo-views select { min-width: 0; padding: 8px; border: 1px solid #b9c8db; border-radius: 8px; }
.product-3d-tripo-note { margin: 0; font-size: 13px; color: #52657e; }
.product-3d-tripo-steps { margin: 0; padding-left: 24px; font-size: 13px; color: #52657e; }
.product-3d-tripo-steps li + li { margin-top: 4px; }
.product-3d-tripo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#product-3d-tripo-status { min-height: 22px; color: #234664; }
@media (max-width: 620px) { .product-3d-tripo-overlay { padding: 0; } .product-3d-tripo-shell { max-height: 100dvh; border-radius: 0; } .product-3d-tripo-views { grid-template-columns: 1fr; } .product-3d-tripo-selection { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.product-3d-capture-shell, .product-3d-viewer-shell {
  width: min(1180px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 20px;
  background: #f7fafc;
  box-shadow: 0 28px 70px rgba(0,0,0,.32);
}
.product-3d-capture-head, .product-3d-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #dce5ef;
  background: #fff;
}
.product-3d-capture-head h2, .product-3d-viewer-head h2 { margin: 2px 0 0; color: #13233b; font-size: 20px; }
.product-3d-eyebrow { color: #0f766e; font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.product-3d-capture-context { margin-top: 4px; color: #66758a; font-size: 12px; }
.product-3d-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #edf2f7; color: #253858; font-size: 25px; cursor: pointer; }
.product-3d-capture-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 16px; padding: 16px; }
.product-3d-camera-column, .product-3d-review-column { min-width: 0; }
.product-3d-camera-stage {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(circle at center, #253858, #08111e 70%);
}
.product-3d-camera-stage video, .product-3d-guide-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.product-3d-guide-canvas { pointer-events: none; }
.product-3d-camera-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: #cbd5e1; text-align: center; }
.product-3d-direction-callout { position: absolute; top: 14px; left: 14px; padding: 7px 12px; border-radius: 999px; background: rgba(8, 20, 35, .72); color: #7ff4e8; font-size: 13px; font-weight: 900; }
.product-3d-analysis-canvas { position: fixed; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.product-3d-live-feedback { min-height: 42px; margin-top: 8px; padding: 10px 13px; border-radius: 10px; background: #fff4e5; color: #955100; font-size: 13px; font-weight: 700; }
.product-3d-live-feedback.good { background: #e9fbf5; color: #087f5b; }
.product-3d-camera-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.product-3d-camera-actions button.active { background: #0f766e; border-color: #0f766e; color: #fff; }
.product-3d-retention-note { margin: 8px 0 0; color: #65758b; font-size: 11px; }
.product-3d-review-column { display: flex; flex-direction: column; gap: 10px; }
.product-3d-review-card { padding: 13px; border: 1px solid #dce5ef; border-radius: 13px; background: #fff; }
.product-3d-review-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #253858; font-size: 13px; }
.product-3d-capture-dial { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.product-3d-direction { min-height: 42px; padding: 5px; border: 1px solid #d8e2ee; border-radius: 9px; background: #f8fafc; color: #6b778c; font-size: 10px; cursor: pointer; }
.product-3d-direction span { display: block; width: 8px; height: 8px; margin: 0 auto 4px; border-radius: 50%; background: #ccd5e1; }
.product-3d-direction.covered { border-color: #5ed0b8; background: #ecfdf5; color: #087f5b; }
.product-3d-direction.covered span { background: #10b981; }
.product-3d-direction.next { outline: 2px solid #2563eb; color: #174ea6; }
.product-3d-analysis-results { max-height: 184px; overflow: auto; }
.product-3d-analysis-results > p { margin: 0; color: #7b8799; font-size: 12px; }
.product-3d-analysis-row { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid #edf1f5; }
.product-3d-analysis-row > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fee2e2; color: #b91c1c; font-weight: 900; }
.product-3d-analysis-row.accepted > span { background: #d1fae5; color: #047857; }
.product-3d-analysis-row strong, .product-3d-analysis-row small { display: block; }
.product-3d-analysis-row strong { color: #27364d; font-size: 12px; }
.product-3d-analysis-row small { margin-top: 2px; color: #7b8799; font-size: 10px; }
.product-3d-quality-list { margin: 0; padding-left: 18px; color: #58677d; font-size: 12px; }
.product-3d-submit-status { min-height: 36px; color: #53637a; font-size: 12px; }
.product-3d-submit-status[data-status="error"] { color: #b42318; }
.product-3d-submit-status[data-status="success"] { color: #087f5b; }
.product-3d-submit { width: 100%; min-height: 44px; }
.product-3d-camera-actions button:disabled, .product-3d-submit:disabled { opacity: .48; cursor: not-allowed; }
.product-3d-detail-pane { min-height: 180px; }
.product-3d-model-list { display: grid; gap: 10px; }
.product-3d-kind-group { display: grid; gap: 8px; min-width: 0; }
.product-3d-kind-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #667085; font-size: 12px; }
.product-3d-kind-group.rebuilt .product-3d-kind-group-head strong { color: var(--kind-rebuilt-fg); }
.product-3d-kind-group.aftermarket_new .product-3d-kind-group-head strong { color: var(--kind-aftermarket-fg); }
.product-3d-kind-group-list { display: grid; gap: 8px; }
.product-3d-kind-empty { padding: 12px; border: 1px dashed #d9e1de; border-radius: 7px; color: #87928e; font-size: 12px; text-align: center; }
.product-3d-model-card, .product-3d-empty-card, .product-3d-loading-card {
  width: 100%; min-height: 90px; padding: 14px; border: 1px solid #dce5ef; border-radius: 14px; background: #fff;
}
.product-3d-model-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; color: #253858; text-align: left; cursor: pointer; }
.product-3d-model-card strong, .product-3d-model-card small { display: block; }
.product-3d-model-card small { margin-top: 4px; color: #758399; }
.product-3d-model-card b { color: #2563eb; }
.product-3d-model-card i { display: inline-flex; margin-left: 5px; padding: 2px 6px; border-radius: 999px; background: #e8eef6; color: #52647c; font-size: 10px; font-style: normal; }
.product-3d-model-card i[data-model-status="review"] { background: #fff4d6; color: #8a5700; }
.product-3d-model-card i[data-model-status="published"] { background: #dff8ed; color: #087f5b; }
.product-3d-model-card i[data-model-status="failed"], .product-3d-model-card i[data-model-status="needs_capture"] { background: #fee8e7; color: #b42318; }
.product-3d-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.product-3d-card-action { padding: 7px 10px; border: 1px solid #b9c9dd; border-radius: 8px; background: #fff; color: #2563eb; font-weight: 800; cursor: pointer; }
.product-3d-card-action.publish { border-color: #0f766e; background: #0f766e; color: #fff; }
.product-3d-action-heading { color: #52647c; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.product-3d-empty-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #68768b; text-align: center; }
.product-3d-empty-card button { border: 0; background: transparent; color: #2563eb; font-weight: 800; cursor: pointer; }
.product-3d-empty-card [data-hunyuan-readiness]:disabled { opacity: .6; cursor: wait; }
.customer-product-media { min-width: 0; }
.customer-product-media-switch { margin-bottom: 8px; }
.product-3d-viewer-shell { position: relative; width: min(1100px, 100%); overflow: hidden; background: #0b111b; }
.product-3d-viewer-stage { height: min(72vh, 720px); touch-action: none; }
.product-3d-viewer-content, .product-3d-viewer-render { min-width: 0; min-height: 0; }
.product-3d-viewer-render { position: relative; }
.has-photo-comparison .product-3d-viewer-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
.product-3d-viewer-reference { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; max-height: min(72vh, 720px); padding: 12px; overflow: auto; background: #f7fafc; color: #13233b; }
.product-3d-viewer-reference[hidden], .product-3d-viewer-reference img[hidden] { display: none; }
.product-3d-viewer-reference h3, .product-3d-viewer-reference p { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.product-3d-viewer-reference h3 { font-size: 15px; }
#product-3d-viewer-reference-image { width: 100%; height: min(35vh, 300px); flex: 0 0 auto; object-fit: contain; background: #e8edf4; }
.product-3d-viewer-reference-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.product-3d-viewer-reference-photos button { min-width: 0; padding: 5px; border: 1px solid #b9c8db; border-radius: 7px; background: #fff; color: #13233b; cursor: pointer; }
.product-3d-viewer-reference-photos img { width: 100%; height: 58px; object-fit: contain; }
.product-3d-viewer-reference-photos span { display: block; font-size: 10px; overflow-wrap: anywhere; }
.product-3d-viewer-reference-photos button[aria-pressed="true"] { border-color: #008b91; box-shadow: 0 0 0 1px #008b91; background: #e7f8f6; }
.product-3d-viewer-reference-photos button:disabled { opacity: .5; cursor: default; }
.product-3d-viewer-reference-photos button:focus-visible { outline: 3px solid #2676dd; outline-offset: 1px; }
.product-3d-viewer-shell:fullscreen { display: flex; flex-direction: column; width: 100vw; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
.product-3d-viewer-shell:fullscreen .product-3d-viewer-content { flex: 1 1 auto; display: grid; }
.product-3d-viewer-shell:fullscreen .product-3d-viewer-render { display: flex; }
.product-3d-viewer-shell:fullscreen .product-3d-viewer-reference { max-height: none; }
.product-3d-viewer-shell:fullscreen .product-3d-viewer-stage { flex: 1 1 auto; min-height: 0; height: auto; }
.product-3d-viewer-stage canvas { display: block; width: 100%; height: 100%; }
.product-3d-viewer-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #dce6f2; background: rgba(8, 15, 25, .76); }
.product-3d-viewer-loading[hidden] { display: none; }
.product-3d-viewer-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; background: #101a29; color: #a9b7ca; font-size: 11px; }
#product-3d-viewer-fullscreen-notice { color: #fbbf77; }
.product-3d-viewer-toolbar [hidden] { display: none; }
.product-3d-viewer-toolbar button { padding: 7px 12px; border: 1px solid #3e4d63; border-radius: 8px; background: #1b293d; color: #eef5ff; cursor: pointer; }
.product-3d-viewer-export { padding: 7px 12px; border: 1px solid #3e4d63; border-radius: 8px; background: #1b293d; color: #eef5ff; text-decoration: none; }
.product-3d-viewer-export:focus-visible { outline: 2px solid #77f5e7; outline-offset: 2px; }
.product-3d-viewer-toolbar button[aria-pressed="true"] { border-color: #2dd4bf; color: #77f5e7; }
.product-3d-has-badge { display: inline-flex; margin-left: 5px; padding: 2px 7px; border-radius: 999px; background: #e6fffa; color: #087f75; font-size: 10px; font-weight: 900; }

@media (max-width: 820px) {
  .product-3d-model-card { grid-template-columns: auto minmax(0, 1fr); }
  .product-3d-card-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .product-3d-capture-overlay, .product-3d-viewer-overlay { padding: 0; align-items: stretch; }
  .product-3d-capture-shell, .product-3d-viewer-shell { max-height: 100dvh; border: 0; border-radius: 0; }
  .product-3d-viewer-shell { display: flex; flex-direction: column; height: 100dvh; }
  .product-3d-capture-body { grid-template-columns: 1fr; padding: 10px; }
  .product-3d-camera-stage { min-height: min(50vh, 430px); }
  .product-3d-capture-dial { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .product-3d-review-column { padding-bottom: 24px; }
  .product-3d-viewer-stage { flex: 1 1 auto; min-height: 0; height: auto; }
  .product-3d-viewer-content { flex: 1 1 auto; display: grid; }
  .product-3d-viewer-render { display: flex; }
  .has-photo-comparison .product-3d-viewer-content { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(160px, 1fr) minmax(240px, 1fr); }
  .product-3d-viewer-reference { max-height: none; }
  #product-3d-viewer-reference-image { height: 170px; }
  .product-3d-viewer-toolbar { flex: 0 0 auto; }
  .product-3d-viewer-toolbar span { flex-basis: 100%; }
}

/* Multipart waybill layout designer */
.shipping-document-title-block { min-width: 320px; }
.shipping-document-title-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.shipping-document-title-actions a,
.shipping-waybill-layout-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #9fb0c3;
  border-radius: 6px;
  background: #fff;
  color: #18314f;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
.shipping-document-title-actions a { border-color: #287356; background: #287356; color: #fff; }
.shipping-document-title-actions a:hover { border-color: #1f6248; background: #1f6248; }
.shipping-waybill-layout-open:hover { border-color: #236fb5; color: #155a94; }
.shipping-waybill-layout-card {
  display: flex;
  flex-direction: column;
  width: min(1460px, calc(100vw - 24px));
  height: min(920px, calc(100dvh - 24px));
  max-width: none;
  padding: 0;
  overflow: hidden;
}
.shipping-waybill-layout-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid #d8e0e8;
  background: #f6f9fc;
}
.shipping-waybill-layout-heading span {
  color: #236fb5;
  font-size: 10px;
  font-weight: 900;
}
.shipping-waybill-layout-heading h3 { margin: 3px 0 4px; color: #13243a; font-size: 21px; }
.shipping-waybill-layout-heading p { margin: 0; color: #627188; font-size: 12px; }
.shipping-waybill-layout-heading button {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid #c7d2de;
  border-radius: 6px;
  background: #fff;
  color: #53647a;
  cursor: pointer;
}
.shipping-waybill-layout-content { min-height: 0; flex: 1; overflow: auto; }
.shipping-waybill-layout-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(220px, 1fr) minmax(160px, auto) auto minmax(220px, .8fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px 16px;
  border-bottom: 1px solid #dde4eb;
  background: #fff;
}
.shipping-waybill-layout-toolbar label,
.shipping-waybill-inspector label,
.shipping-waybill-paper-settings label,
.shipping-waybill-change-note { display: grid; gap: 5px; min-width: 0; }
.shipping-waybill-layout-toolbar label > span,
.shipping-waybill-inspector label > span,
.shipping-waybill-paper-settings label > span,
.shipping-waybill-change-note > span {
  color: #5b697c;
  font-size: 11px;
  font-weight: 700;
}
.shipping-waybill-layout-toolbar select,
.shipping-waybill-layout-toolbar button,
.shipping-waybill-inspector input,
.shipping-waybill-inspector select,
.shipping-waybill-paper-settings input,
.shipping-waybill-change-note input {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #c9d4df;
  border-radius: 5px;
  background: #fff;
  color: #17263a;
}
.shipping-waybill-layout-toolbar button { width: auto; font-weight: 800; cursor: pointer; }
.shipping-waybill-layout-toolbar button:disabled { opacity: .5; cursor: default; }
.shipping-waybill-layout-toolbar > .shipping-carrier-brand { align-self: center; }
.shipping-waybill-purpose-note {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 8px 16px;
  border-bottom: 1px solid #dbe4ec;
  background: #eef7f2;
  color: #264b3a;
  font-size: 12px;
}
.shipping-waybill-purpose-note.return { background: #fff8e8; color: #684d12; }
.shipping-waybill-purpose-note strong { flex: 0 0 auto; font-size: 12px; }
.shipping-waybill-purpose-note span { min-width: 0; }
.shipping-waybill-layout-version {
  display: grid;
  gap: 1px;
  min-width: 128px;
  padding: 5px 10px;
  border-left: 3px solid #236fb5;
}
.shipping-waybill-layout-version span,
.shipping-waybill-layout-version small { color: #6e7b8e; font-size: 10px; }
.shipping-waybill-layout-version strong { color: #18314f; font-size: 15px; }
.shipping-waybill-layout-workspace {
  display: grid;
  grid-template-columns: 230px minmax(500px, 1fr) 290px;
  min-height: 580px;
}
.shipping-waybill-field-list,
.shipping-waybill-inspector { min-width: 0; padding: 14px; background: #f6f8fa; }
.shipping-waybill-field-list { border-right: 1px solid #dbe2e9; }
.shipping-waybill-inspector { border-left: 1px solid #dbe2e9; }
.shipping-waybill-field-list > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: #33455c;
  font-size: 12px;
}
.shipping-waybill-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-top: 1px solid #dfe5eb;
  background: #fff;
}
.shipping-waybill-field-row:last-child { border-bottom: 1px solid #dfe5eb; }
.shipping-waybill-field-row.selected { box-shadow: inset 3px 0 #236fb5; background: #edf5fc; }
.shipping-waybill-field-row.suppressed { background: #eef1f4; opacity: .72; }
.shipping-waybill-field-row.suppressed button { cursor: default; }
.shipping-waybill-field-row.suppressed button strong { color: #667386; }
.shipping-waybill-field-row button {
  min-width: 0;
  padding: 8px 9px;
  border: 0;
  background: transparent;
  color: #25364c;
  text-align: left;
  cursor: pointer;
}
.shipping-waybill-field-row button strong,
.shipping-waybill-field-row button span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shipping-waybill-field-row button strong { font-size: 11px; }
.shipping-waybill-field-row button span { margin-top: 2px; color: #768397; font-size: 9px; }
.shipping-waybill-field-row > label {
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 5px 7px;
  color: #6e7b8e;
  font-size: 9px;
}
.shipping-waybill-preview { min-width: 0; padding: 14px 18px; background: #e9edf1; }
.shipping-waybill-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.shipping-waybill-preview-head div { display: flex; align-items: baseline; gap: 9px; }
.shipping-waybill-preview-head strong { color: #17283d; font-size: 14px; }
.shipping-waybill-preview-head span,
.shipping-waybill-preview-head em { color: #637187; font-size: 10px; font-style: normal; }
.shipping-waybill-preview-head em { padding: 3px 7px; border: 1px solid #b7c7d8; border-radius: 4px; background: #fff; }
.shipping-waybill-canvas-wrap {
  display: grid;
  place-items: center;
  min-height: 460px;
  padding: 18px;
  overflow: auto;
  border: 1px solid #c9d2dc;
  background: #d9dee3;
}
#shipping-waybill-layout-canvas {
  display: block;
  width: min(100%, 920px);
  height: auto;
  border: 1px solid #aeb8c3;
  background: #fff;
  box-shadow: 0 4px 14px rgba(30, 45, 60, .15);
  cursor: move;
  touch-action: none;
}
#shipping-waybill-layout-canvas:focus { outline: 3px solid rgba(35, 111, 181, .35); outline-offset: 2px; }
.shipping-waybill-preview > p { margin: 8px 0 0; color: #657387; font-size: 10px; }
.shipping-waybill-inspector-head { display: grid; gap: 2px; margin-bottom: 11px; }
.shipping-waybill-inspector-head span { color: #738096; font-size: 10px; }
.shipping-waybill-inspector-head strong { color: #1a2d46; font-size: 14px; }
.shipping-waybill-inspector-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.shipping-waybill-inspector-grid .wide { grid-column: 1 / -1; }
.shipping-waybill-inspector-grid .check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #d4dde6;
  background: #fff;
}
.shipping-waybill-inspector-grid .check span { color: #30445d; }
.shipping-waybill-paper-settings { margin-top: 15px; padding-top: 13px; border-top: 1px solid #d7dfe7; }
.shipping-waybill-paper-settings > strong { display: block; margin-bottom: 8px; color: #243a55; font-size: 12px; }
.shipping-waybill-paper-settings > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.shipping-waybill-change-note { margin-top: 13px; }
.shipping-waybill-layout-empty { display: grid; place-items: center; min-height: 180px; padding: 24px; color: #66778c; }
.shipping-waybill-layout-empty.error { color: #c62828; }
.shipping-waybill-layout-card > .sales-order-detail-message { min-height: 20px; margin: 0; padding: 4px 18px; }
.shipping-waybill-layout-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 11px 16px;
  border-top: 1px solid #d8e0e8;
  background: #fff;
}
.shipping-waybill-layout-footer a { margin-right: auto; color: #155a94; font-size: 12px; font-weight: 800; }

/* Guided handwritten multipart waybills */
.shipping-handwritten-waybill-card {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
}
.shipping-handwritten-waybill-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px 14px;
  border-bottom: 1px solid #d8e0e8;
  background: #f6f9fc;
}
.shipping-handwritten-waybill-heading > div { min-width: 0; }
.shipping-handwritten-waybill-heading > div > span {
  color: #287356;
  font-size: 10px;
  font-weight: 900;
}
.shipping-handwritten-waybill-heading h3 { margin: 3px 0 4px; color: #13243a; font-size: 21px; }
.shipping-handwritten-waybill-heading p { margin: 0; color: #627188; font-size: 12px; }
.shipping-handwritten-waybill-heading button {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid #c7d2de;
  border-radius: 6px;
  background: #fff;
  color: #53647a;
  cursor: pointer;
}
.shipping-handwritten-waybill-progress {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 20px;
  border-bottom: 1px solid #dce3ea;
  background: #fff;
  color: #68778b;
  font-size: 11px;
}
.shipping-handwritten-waybill-progress strong { color: #18314f; font-size: 15px; }
.shipping-handwritten-waybill-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 0;
  overflow: auto;
  background: #edf1f4;
}
.shipping-handwritten-waybill-preview { min-width: 0; padding: 16px 18px; }
.shipping-handwritten-waybill-preview > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.shipping-handwritten-waybill-preview > div:first-child strong { color: #17283d; font-size: 14px; }
.shipping-handwritten-waybill-preview > div:first-child span { color: #637187; font-size: 10px; }
.shipping-handwritten-waybill-preview > .shipping-handwritten-waybill-brand { align-items: center; }
.shipping-handwritten-waybill-brand > .shipping-carrier-brand { flex: 0 0 auto; }
.shipping-handwritten-waybill-brand > .shipping-carrier-brand .shipping-carrier-brand-copy strong { font-size: 10px; }
.shipping-handwritten-waybill-brand > span { line-height: 1.45; text-align: right; }
.shipping-handwritten-waybill-canvas-wrap {
  display: grid;
  place-items: center;
  min-height: 440px;
  padding: 18px;
  overflow: auto;
  border: 1px solid #c9d2dc;
  background: #d9dee3;
}
#shipping-handwritten-waybill-canvas {
  display: block;
  width: min(100%, 820px);
  height: auto;
  border: 1px solid #aeb8c3;
  background: #fff;
  box-shadow: 0 4px 14px rgba(30, 45, 60, .15);
}
.shipping-handwritten-waybill-values {
  min-width: 0;
  padding: 16px;
  border-left: 1px solid #d6dee6;
  background: #fff;
}
.shipping-handwritten-waybill-values > div {
  display: grid;
  gap: 2px;
  padding: 0 0 11px;
  border-bottom: 2px solid #287356;
}
.shipping-handwritten-waybill-values > div span,
.shipping-handwritten-waybill-values > div small { color: #6d7a8d; font-size: 10px; }
.shipping-handwritten-waybill-values > div strong { color: #162a41; font-size: 16px; }
.shipping-handwritten-waybill-values dl { margin: 8px 0 0; }
.shipping-handwritten-waybill-values dl > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid #e2e7ec;
}
.shipping-handwritten-waybill-values dt { color: #69778a; font-size: 10px; }
.shipping-handwritten-waybill-values dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #17283d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.shipping-handwritten-waybill-values > p {
  margin: 12px 0 0;
  padding: 9px 10px;
  border-left: 3px solid #c58a14;
  background: #fff9e8;
  color: #6c571f;
  font-size: 10px;
  line-height: 1.6;
}
.shipping-handwritten-waybill-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 380px;
  padding: 24px;
  color: #66778c;
  background: #fff;
}
.shipping-handwritten-waybill-empty.error { color: #c62828; }
.shipping-handwritten-waybill-card > .sales-order-detail-message { min-height: 20px; margin: 0; padding: 4px 20px; }
.shipping-handwritten-waybill-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 11px 16px;
  border-top: 1px solid #d8e0e8;
  background: #fff;
}

@media (max-width: 1080px) {
  .shipping-waybill-layout-card { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
  .shipping-waybill-layout-toolbar { grid-template-columns: 1fr 120px; }
  .shipping-waybill-purpose-note { align-items: flex-start; flex-direction: column; gap: 2px; }
  .shipping-waybill-layout-toolbar > .shipping-carrier-brand { justify-self: start; }
  .shipping-waybill-layout-workspace { grid-template-columns: 190px minmax(420px, 1fr); }
  .shipping-waybill-inspector { grid-column: 1 / -1; border-top: 1px solid #dbe2e9; border-left: 0; }
  .shipping-waybill-inspector-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shipping-waybill-inspector-grid .wide { grid-column: auto; }
  .shipping-handwritten-waybill-content { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 760px) {
  .shipping-document-title-block { min-width: 0; }
  .shipping-document-title-actions { align-items: stretch; flex-direction: column; }
  .shipping-document-title-actions a,
  .shipping-waybill-layout-open { width: 100%; }
  .shipping-waybill-layout-heading { padding: 13px; }
  .shipping-waybill-layout-heading h3 { font-size: 18px; }
  .shipping-waybill-layout-toolbar { grid-template-columns: 1fr; padding: 10px; }
  .shipping-waybill-layout-workspace { display: block; }
  .shipping-waybill-field-list { max-height: 210px; overflow: auto; border-right: 0; border-bottom: 1px solid #dbe2e9; }
  .shipping-waybill-preview { padding: 10px; }
  .shipping-waybill-canvas-wrap { min-height: 280px; padding: 9px; }
  .shipping-waybill-inspector-grid { grid-template-columns: 1fr 1fr; }
  .shipping-waybill-layout-footer { flex-wrap: wrap; }
  .shipping-waybill-layout-footer a { width: 100%; margin-right: 0; }
  .shipping-handwritten-waybill-card { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }
  .shipping-handwritten-waybill-heading { padding: 13px; }
  .shipping-handwritten-waybill-heading h3 { font-size: 18px; }
  .shipping-handwritten-waybill-progress { align-items: flex-start; flex-direction: column; gap: 2px; padding: 8px 13px; }
  .shipping-handwritten-waybill-content { display: block; }
  .shipping-handwritten-waybill-preview { padding: 10px; }
  .shipping-handwritten-waybill-preview > div:first-child { align-items: flex-start; flex-direction: column; gap: 2px; }
  .shipping-handwritten-waybill-brand > span { text-align: left; }
  .shipping-handwritten-waybill-canvas-wrap { min-height: 260px; padding: 8px; }
  .shipping-handwritten-waybill-values { border-top: 1px solid #d6dee6; border-left: 0; }
  .shipping-handwritten-waybill-values dl > div { grid-template-columns: 92px minmax(0, 1fr); }
}
.core-return-mgmt-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  height: calc(100vh - 48px);
  overflow: hidden;
  background: #eef1f3;
}
.core-return-mgmt-toolbar {
  display: grid;
  grid-template-columns: minmax(270px, .7fr) minmax(560px, 1.3fr);
  align-items: end;
  gap: 28px;
  border-bottom: 1px solid #ccd4da;
  padding: 16px 24px;
  background: #fff;
}
.core-return-mgmt-title-block > span {
  color: #287356;
  font-size: 9px;
  font-weight: 900;
}
.core-return-mgmt-title-block h1 {
  margin: 3px 0 0;
  color: #162435;
  font-size: 22px;
  letter-spacing: 0;
}
.core-return-mgmt-title-block p {
  margin: 4px 0 0;
  color: #687582;
  font-size: 10px;
}
.core-return-mgmt-search-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 150px auto;
  gap: 8px;
}
.core-return-mgmt-search-row input,
.core-return-mgmt-search-row select {
  min-width: 0;
  height: 38px;
  border: 1px solid #b8c2ca;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: #25313d;
  font-size: 11px;
}
.core-return-mgmt-search-row .btn-primary {
  min-width: 76px;
  min-height: 38px;
  white-space: nowrap;
}
.core-return-mgmt-message {
  grid-column: 1 / -1;
  min-height: 14px;
  color: #287356;
  font-size: 9px;
  font-weight: 800;
}
.core-return-mgmt-message.error { color: #b42318; }
.core-return-mgmt-workspace {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(310px, 350px) minmax(0, 1fr);
  min-height: 0;
}
.core-return-mgmt-list-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid #cbd3d9;
  background: #f6f8f9;
}
.core-return-mgmt-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  border-bottom: 1px solid #d3d9de;
  padding: 0 14px;
  color: #273542;
  font-size: 11px;
}
.core-return-mgmt-list-head span {
  color: #75818b;
  font-size: 9px;
}
.core-return-mgmt-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.core-return-mgmt-list-row {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #dce1e5;
  border-left: 4px solid transparent;
  padding: 11px 12px 10px;
  background: #fff;
  color: #25313d;
  cursor: pointer;
  text-align: left;
}
.core-return-mgmt-list-row:hover { background: #f4f8f6; }
.core-return-mgmt-list-row.selected {
  border-left-color: #287356;
  background: #eaf5ef;
}
.core-return-mgmt-list-row.overdue { border-left-color: #c43229; background: #fff7f6; }
.core-return-mgmt-list-row.received,
.core-return-mgmt-list-row.inspected { border-left-color: #c58b22; }
.core-return-mgmt-list-row.resolved { border-left-color: #47866a; }
.core-return-mgmt-list-top,
.core-return-mgmt-list-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.core-return-mgmt-list-top strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.core-return-mgmt-list-top em {
  flex: 0 0 auto;
  border: 1px solid #9ebaaa;
  border-radius: 4px;
  padding: 2px 5px;
  background: #eef8f2;
  color: #287356;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.core-return-mgmt-list-row.overdue .core-return-mgmt-list-top em {
  border-color: #e4a39e;
  background: #fff0ee;
  color: #ad2d25;
}
.core-return-mgmt-list-order,
.core-return-mgmt-list-part,
.core-return-mgmt-list-part small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.core-return-mgmt-list-order {
  margin-top: 6px;
  color: #687581;
  font-size: 9px;
}
.core-return-mgmt-list-part { margin-top: 4px; font-size: 11px; font-weight: 800; }
.core-return-mgmt-list-part small { margin-top: 2px; color: #78838d; font-size: 8px; font-weight: 500; }
.core-return-mgmt-list-bottom { margin-top: 7px; color: #77828b; font-size: 8px; }
.core-return-mgmt-list-empty {
  padding: 32px 18px;
  color: #84909a;
  font-size: 10px;
  text-align: center;
}
.core-return-mgmt-detail-pane {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px 28px;
  background: #fff;
}
.core-return-mgmt-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  min-height: 260px;
  color: #7d8994;
  font-size: 10px;
  text-align: center;
}
.core-return-mgmt-empty strong { color: #4f5d69; font-size: 14px; }
.core-return-mgmt-empty.error { color: #b42318; }
.core-return-mgmt-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 2px solid #24364b;
  padding-bottom: 11px;
}
.core-return-mgmt-detail-head span { color: #287356; font-size: 8px; font-weight: 900; }
.core-return-mgmt-detail-head h2 {
  margin: 2px 0 0;
  color: #14243a;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.core-return-mgmt-detail-head p { margin: 3px 0 0; color: #697681; font-size: 10px; }
.core-return-mgmt-detail-head > em {
  flex: 0 0 auto;
  border: 1px solid #9ebaaa;
  border-radius: 4px;
  padding: 5px 8px;
  background: #eef8f2;
  color: #287356;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.core-return-mgmt-detail-head > em.overdue {
  border-color: #dc958f;
  background: #fff0ee;
  color: #a92d25;
}
.core-return-mgmt-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid #d4dbe0;
  background: #f7f9fa;
}
.core-return-mgmt-facts > div {
  min-width: 0;
  border-right: 1px solid #d9dfe4;
  padding: 10px 12px;
}
.core-return-mgmt-facts > div:last-child { border-right: 0; }
.core-return-mgmt-facts span,
.core-return-mgmt-facts strong,
.core-return-mgmt-facts small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.core-return-mgmt-facts span { color: #75818c; font-size: 8px; font-weight: 800; }
.core-return-mgmt-facts strong { margin-top: 3px; color: #223140; font-size: 12px; }
.core-return-mgmt-facts small { margin-top: 2px; color: #83909a; font-size: 8px; }
.core-return-mgmt-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #d6dde2;
}
.core-return-mgmt-section {
  min-width: 0;
  padding: 15px 16px;
}
.core-return-mgmt-section + .core-return-mgmt-section { border-left: 1px solid #d6dde2; }
.core-return-mgmt-section.disabled { background: #fafbfb; }
.core-return-mgmt-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.core-return-mgmt-section-head > div { display: flex; align-items: center; gap: 7px; }
.core-return-mgmt-section-head > div > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #287356;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}
.core-return-mgmt-section-head h3 { margin: 0; color: #243342; font-size: 14px; letter-spacing: 0; }
.core-return-mgmt-section-head > small { max-width: 230px; color: #7a8791; font-size: 8px; text-align: right; }
.core-return-mgmt-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.core-return-mgmt-form label { min-width: 0; }
.core-return-mgmt-form label.wide { grid-column: 1 / -1; }
.core-return-mgmt-form label > span {
  display: block;
  margin-bottom: 4px;
  color: #66737d;
  font-size: 8px;
  font-weight: 800;
}
.core-return-mgmt-form input,
.core-return-mgmt-form select,
.core-return-mgmt-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #b9c3cb;
  border-radius: 5px;
  padding: 0 9px;
  background: #fff;
  color: #263440;
  font-size: 10px;
}
.core-return-mgmt-form input,
.core-return-mgmt-form select { height: 34px; }
.core-return-mgmt-form textarea { min-height: 58px; padding-top: 8px; resize: vertical; }
.core-return-mgmt-actions { display: flex; justify-content: flex-end; margin-top: 11px; }
.core-return-mgmt-actions button {
  min-height: 34px;
  border: 1px solid #287356;
  border-radius: 5px;
  padding: 0 14px;
  background: #287356;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.core-return-mgmt-actions button:disabled { border-color: #bfc8c3; background: #dfe4e1; color: #87918c; }
.core-return-mgmt-section-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  color: #86919a;
  font-size: 10px;
}
.core-return-mgmt-refund-complete {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  color: #256344;
}
.core-return-mgmt-refund-complete strong { font-size: 15px; }
.core-return-mgmt-refund-complete small { color: #728079; font-size: 9px; }
.core-return-mgmt-refund-complete p { margin: 4px 0 0; color: #52625a; font-size: 10px; white-space: pre-wrap; }
.core-return-mgmt-history { padding: 16px; }
.core-return-mgmt-history-list { border-top: 1px solid #d9e0e4; }
.core-return-mgmt-history-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 9px;
  border-bottom: 1px solid #e2e7ea;
  padding: 9px 4px;
}
.core-return-mgmt-history-row > span {
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border: 2px solid #6aa083;
  border-radius: 50%;
  background: #fff;
}
.core-return-mgmt-history-row strong,
.core-return-mgmt-history-row small,
.core-return-mgmt-history-row em { display: block; }
.core-return-mgmt-history-row strong { color: #293744; font-size: 10px; }
.core-return-mgmt-history-row small { margin-top: 2px; color: #85909a; font-size: 8px; }
.core-return-mgmt-history-row em { margin-top: 4px; color: #287356; font-size: 9px; font-style: normal; font-weight: 800; }
.core-return-mgmt-history-row p { margin: 4px 0 0; color: #606d77; font-size: 9px; white-space: pre-wrap; }
.core-return-mgmt-history-empty { color: #84909a; font-size: 10px; }

@media (max-width: 980px) {
  .core-return-mgmt-toolbar { grid-template-columns: 1fr; gap: 12px; }
  .core-return-mgmt-body { height: auto; min-height: calc(100vh - 48px); overflow: visible; }
  .core-return-mgmt-workspace { grid-template-columns: 1fr; }
  .core-return-mgmt-list-pane { max-height: 320px; border-right: 0; border-bottom: 1px solid #cbd3d9; }
  .core-return-mgmt-detail-pane { overflow: visible; padding: 16px; }
  .core-return-mgmt-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .core-return-mgmt-facts > div:nth-child(even) { border-right: 0; }
  .core-return-mgmt-sections { grid-template-columns: 1fr; }
  .core-return-mgmt-section + .core-return-mgmt-section { border-top: 1px solid #d6dde2; border-left: 0; }
}

@media (max-width: 620px) {
  .core-return-mgmt-toolbar { padding: 13px 12px; }
  .core-return-mgmt-search-row { grid-template-columns: 1fr auto; }
  .core-return-mgmt-search-row input { grid-column: 1 / -1; }
  .core-return-mgmt-workspace { display: block; }
  .core-return-mgmt-detail-pane { padding: 12px; }
  .core-return-mgmt-facts,
  .core-return-mgmt-form { grid-template-columns: 1fr; }
  .core-return-mgmt-facts > div { border-right: 0; border-bottom: 1px solid #d9dfe4; }
  .core-return-mgmt-form label.wide { grid-column: auto; }
  .core-return-mgmt-detail-head h2 { font-size: 20px; }
}
.sales-order-edit-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sales-order-revision-overlay { display: none; position: fixed; inset: 0; z-index: 11000; padding: 20px; background: rgba(0,0,0,.45); }
.sales-order-revision-overlay.show { display: flex; align-items: center; justify-content: center; }
.sales-order-revision-dialog { display: flex; flex-direction: column; width: min(1240px,100%); max-height: calc(100dvh - 40px); background: #fff; color: #172432; border-radius: 6px; overflow: hidden; font-size: 13px; }
.sales-order-revision-dialog header, .sales-order-revision-dialog footer { display: flex; align-items: center; gap: 12px; padding: 14px 20px; flex: 0 0 auto; }
.sales-order-revision-dialog header { justify-content: space-between; border-bottom: 1px solid #ccd5dc; }
.sales-order-revision-dialog h2 { margin: 0; font-size: 19px; letter-spacing: 0; }
.sales-order-revision-dialog h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: 0; }
.sales-order-revision-body { overflow: auto; padding: 0 20px; }
.sales-order-revision-body section { padding: 18px 0; border-bottom: 1px solid #dce2e7; }
.sales-order-revision-workspace { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(360px,1fr); gap: 24px; }
.sales-order-revision-order-pane { min-width: 0; }
.sales-order-revision-body .sales-order-revision-delivery-pane { padding-left: 24px; border-left: 1px solid #dce2e7; }
.sales-order-revision-dialog .customer-order-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.sales-order-revision-dialog .customer-order-shipping-methods { grid-template-columns: minmax(0,1fr); }
.sales-order-revision-dialog .customer-order-form-grid label > span { margin-bottom: 0; font-size: 13px; font-weight: 500; }
.sales-order-revision-dialog .customer-order-shipping-method small { font-size: 11px; }
.sales-order-revision-dialog .customer-order-line { grid-template-columns: minmax(0,1fr) 66px 100px 92px 94px 34px; gap: 8px; }
.sales-order-revision-dialog .customer-order-product { min-width: 0; }
.sales-order-revision-dialog .customer-order-product strong, .sales-order-revision-dialog .customer-order-product small { overflow-wrap: anywhere; }
.sales-order-revision-dialog .customer-order-product em { font-size: 11px; color: #b3261e; font-style: normal; }
.sales-order-revision-dialog .customer-order-product em.charge-no-return { color: #76520d; }
.sales-order-revision-dialog .sales-order-revision-core-choice { display: grid; width: min(100%, 320px); gap: 4px; }
.sales-order-revision-dialog .sales-order-revision-core-choice > span,
.sales-order-revision-dialog .sales-order-revision-core-choice small { line-height: 1.45; }
.sales-order-revision-dialog .sales-order-revision-core-choice select { min-height: 36px; }
.sales-order-revision-dialog .customer-order-line-metric { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sales-order-revision-dialog .customer-order-line-metric.total { grid-column: auto; text-align: right; }
.sales-order-revision-dialog .customer-order-line-metric strong { overflow-wrap: anywhere; }
.sales-order-revision-dialog .customer-order-remove { grid-column: auto; grid-row: auto; }
.sales-order-revision-dialog .sales-order-pricing-adjustment-row { grid-template-columns: minmax(100px,1fr) 100px minmax(100px,1fr) 34px; }
.sales-order-revision-dialog .sales-order-pricing-adjustment-row label > span { font-size: 12px; }
.sales-order-revision-dialog .sales-order-pricing-adjustment-row button { width: 34px; padding: 0; font-size: 20px; }
.sales-order-revision-shipping-fee { margin-top: 14px; max-width: 180px; }
.sales-order-revision-dialog label { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; font-size: 13px; }
.sales-order-revision-dialog input:not([type=checkbox]), .sales-order-revision-dialog select, .sales-order-revision-dialog textarea { box-sizing: border-box; width: 100%; min-width: 0; padding: 8px; border: 1px solid #aebdc8; border-radius: 4px; font: inherit; color: inherit; background: #fff; }
.sales-order-revision-dialog textarea { min-height: 65px; resize: vertical; }
.sales-order-revision-dialog button { border: 1px solid #aebdc8; border-radius: 4px; padding: 8px 12px; background: #fff; color: inherit; font: inherit; cursor: pointer; }
.sales-order-revision-dialog button:disabled { opacity: .5; cursor: wait; }
.sales-order-revision-dialog [data-revision-close][aria-label], .sales-order-revision-dialog [data-revision-remove] { width: 34px; height: 34px; padding: 0; font-size: 22px; }
.sales-order-revision-search { display: grid; grid-template-columns: minmax(110px,.9fr) minmax(100px,1.2fr) minmax(105px,.8fr) auto; gap: 8px; align-items: end; margin-bottom: 10px; }
#sales-order-revision-results { max-height: 160px; overflow: auto; font-size: 13px; }
#sales-order-revision-results > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #e0e6e9; }
.sales-order-revision-dialog footer { border-top: 1px solid #ccd5dc; }
#sales-order-revision-message { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
#sales-order-revision-message.error { color: #b3261e; }
#sales-order-revision-save { background: #276a53; color: #fff; border-color: #276a53; white-space: nowrap; }
@media (max-width: 1000px) {
  .sales-order-revision-workspace { grid-template-columns: minmax(0,1fr); gap: 0; }
  .sales-order-revision-body .sales-order-revision-delivery-pane { border-left: 0; padding-left: 0; }
}
@media (max-width: 700px) {
  .sales-order-revision-overlay { padding: 8px; }
  .sales-order-revision-dialog { max-height: calc(100dvh - 16px); }
  .sales-order-revision-dialog header, .sales-order-revision-dialog footer { padding: 12px; }
  .sales-order-revision-body { padding: 0 12px; }
  .sales-order-revision-dialog .customer-order-form-grid { grid-template-columns: minmax(0,1fr); }
  .sales-order-revision-search { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .sales-order-revision-dialog .customer-order-line { grid-template-columns: 65px minmax(0,1fr) minmax(0,1fr) 34px; }
  .sales-order-revision-dialog .customer-order-product { grid-column: 1 / 4; }
  .sales-order-revision-dialog .sales-order-revision-core-choice { width: 100%; max-width: none; }
  .sales-order-revision-dialog .customer-order-remove { grid-column: 4; grid-row: 1; }
  .sales-order-revision-dialog .customer-order-qty { grid-column: 1; grid-row: 2; }
  .sales-order-revision-dialog .customer-order-line-metric { grid-column: 2; grid-row: 2; }
  .sales-order-revision-dialog .customer-order-line-metric.core-charge { grid-column: 3 / 5; grid-row: 2; text-align: right; }
  .sales-order-revision-dialog .customer-order-line-metric.total { grid-column: 2 / 5; grid-row: 3; text-align: right; }
  .sales-order-revision-dialog .sales-order-pricing-adjustment-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 34px; }
  .sales-order-revision-dialog .sales-order-pricing-adjustment-row label:nth-child(3) { grid-column: 1 / 3; }
  .sales-order-revision-dialog .sales-order-pricing-adjustment-row button { grid-column: 3; }
  .sales-order-revision-dialog footer { flex-wrap: wrap; justify-content: flex-end; }
  #sales-order-revision-message { flex: 1 0 100%; }
}

/* Readable screen typography; printed documents use separate templates. */
@media screen {
  #screen-shipping-document-mgmt { font-size: 14px; line-height: 1.5; }
  #screen-shipping-document-mgmt .shipping-document-mgmt-body :where(div, span, strong, small, p, em, label, a, button, input, select) { font-size: inherit; }
  #screen-shipping-document-mgmt .page-header-left { flex-wrap: wrap; }
  #screen-shipping-document-mgmt .page-header :is(button, .header-username, .role-badge, .app-version) { font-size: 12px; }
  #screen-shipping-document-mgmt .page-header .logo-text { font-size: 18px; }
  #screen-shipping-document-mgmt .shipping-document-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 16px; }
  #screen-shipping-document-mgmt .shipping-document-title-block { display: grid; flex: none; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kicker actions" "title actions" "copy actions"; column-gap: 24px; }
  #screen-shipping-document-mgmt .sales-order-kicker { grid-area: kicker; font-size: 12px; letter-spacing: 0; }
  #screen-shipping-document-mgmt .shipping-document-title-block h1 { grid-area: title; font-size: 24px; line-height: 1.3; margin-top: 0; }
  #screen-shipping-document-mgmt .shipping-document-title-block p { grid-area: copy; max-width: 680px; font-size: 12px; line-height: 1.5; margin-top: 3px; }
  #screen-shipping-document-mgmt .shipping-document-title-actions { grid-area: actions; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 0; }
  #screen-shipping-document-mgmt .shipping-document-title-actions :is(a, button) { width: auto; min-height: 40px; padding: 8px 12px; font-size: 14px; white-space: nowrap; }
  #screen-shipping-document-mgmt .shipping-document-lookup { flex: none; width: 100%; }
  #screen-shipping-document-mgmt .shipping-document-filter-row { grid-template-columns: minmax(310px, 1fr) 150px 190px 160px 160px auto; gap: 8px; }
  #screen-shipping-document-mgmt .shipping-document-filter-row :is(input, select, button) { height: 40px; font-size: 14px; }
  #screen-shipping-document-mgmt .shipping-document-date-filter > span { font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-date-filter input { width: 100%; }
  #screen-shipping-document-mgmt .shipping-document-lookup-message { min-height: 18px; margin-top: 4px; font-size: 12px; line-height: 1.5; }
  #screen-shipping-document-mgmt .shipping-document-workspace { grid-template-columns: 340px minmax(0, 1fr); }
  #screen-shipping-document-mgmt .shipping-document-list-head { min-height: 46px; height: auto; padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  #screen-shipping-document-mgmt .shipping-document-list-head > span { font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-list-row { grid-template-columns: 20px minmax(0, 1fr) auto; grid-template-areas: "check main state" "check meta meta"; gap: 8px; padding: 12px; min-height: 112px; }
  #screen-shipping-document-mgmt .shipping-document-row-check { grid-area: check; }
  #screen-shipping-document-mgmt .shipping-document-row-check input { width: 18px; height: 18px; }
  #screen-shipping-document-mgmt .shipping-document-list-main { grid-area: main; }
  #screen-shipping-document-mgmt .shipping-document-list-main strong { font-size: 16px; }
  #screen-shipping-document-mgmt .shipping-document-list-main small { white-space: normal; overflow: visible; font-size: 12px; line-height: 1.5; }
  #screen-shipping-document-mgmt .shipping-document-list-progress { font-size: 12px; overflow: visible; white-space: normal; overflow-wrap: anywhere; }
  #screen-shipping-document-mgmt .shipping-document-order-id-label { font-size: 12px; line-height: 1.4; }
  #screen-shipping-document-mgmt .shipping-document-list-meta { grid-area: meta; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; text-align: left; }
  #screen-shipping-document-mgmt .shipping-document-list-meta strong { font-size: 14px; }
  #screen-shipping-document-mgmt .shipping-document-list-meta small { font-size: 12px; margin: 0; }
  #screen-shipping-document-mgmt .shipping-document-list-row .sales-order-status { grid-area: state; font-size: 12px; justify-self: end; }
  #screen-shipping-document-mgmt .shipping-document-batch-panel { padding: 12px; }
  #screen-shipping-document-mgmt .shipping-document-batch-default-note,
  #screen-shipping-document-mgmt .shipping-document-batch-panel > p { font-size: 12px; line-height: 1.5; }
  #screen-shipping-document-mgmt .shipping-document-batch-types { gap: 8px; margin: 10px 0; }
  #screen-shipping-document-mgmt .shipping-document-batch-types label { font-size: 13px; line-height: 1.5; white-space: nowrap; }
  #screen-shipping-document-mgmt .shipping-document-batch-types input { width: 16px; height: 16px; }
  #screen-shipping-document-mgmt .shipping-document-batch-panel > button { min-height: 40px; font-size: 14px; }
  #screen-shipping-document-mgmt .shipping-document-detail-pane { padding: 16px 18px 24px; }
  #screen-shipping-document-mgmt .shipping-document-detail-head { align-items: center; gap: 12px; padding-bottom: 12px; }
  #screen-shipping-document-mgmt .shipping-document-detail-head > div { min-width: 0; }
  #screen-shipping-document-mgmt .shipping-document-detail-head h2 { font-size: 24px; line-height: 1.3; }
  #screen-shipping-document-mgmt .shipping-document-detail-head strong { font-size: 16px; overflow-wrap: anywhere; }
  #screen-shipping-document-mgmt .shipping-document-detail-target { font-size: 12px; }
  #screen-shipping-document-mgmt .sales-order-detail-message { min-height: 20px; margin: 6px 0; font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-stages > div { padding: 10px; }
  #screen-shipping-document-mgmt .shipping-document-stages span { font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-stages strong { font-size: 14px; line-height: 1.5; margin-top: 3px; }
  #screen-shipping-document-mgmt .shipping-document-delivery { padding: 12px 0; }
  #screen-shipping-document-mgmt .shipping-document-delivery-head h3 { font-size: 16px; }
  #screen-shipping-document-mgmt .shipping-document-destination-badge { min-height: 30px; padding: 4px 10px; font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-destination-label { font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-destination-card > strong { font-size: 17px; }
  #screen-shipping-document-mgmt .shipping-document-destination-card > strong ~ span { font-size: 13px; }
  #screen-shipping-document-mgmt .shipping-document-delivery-facts { grid-template-columns: minmax(150px, 1.35fr) minmax(105px, .9fr) minmax(125px, 1.05fr); }
  #screen-shipping-document-mgmt .shipping-document-delivery-facts dt { font-size: 11px; }
  #screen-shipping-document-mgmt .shipping-document-delivery-facts dd { font-size: 13px; }
  #screen-shipping-document-mgmt .shipping-document-outbound-service dd { overflow-wrap: normal; word-break: keep-all; white-space: nowrap; }
  #screen-shipping-document-mgmt .shipping-document-order-contents { padding: 12px 0; }
  #screen-shipping-document-mgmt :is(.shipping-document-order-contents-head, .shipping-document-section-head) h3 { font-size: 16px; }
  #screen-shipping-document-mgmt .shipping-document-order-contents-head > span { font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-order-item { grid-template-columns: minmax(170px, 1fr) minmax(100px, .45fr) 76px 138px; min-height: 62px; padding: 8px; gap: 12px; }
  #screen-shipping-document-mgmt .shipping-document-order-item > div strong { font-size: 15px; }
  #screen-shipping-document-mgmt .shipping-document-order-item > div span { font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-order-core { font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-section { margin-top: 16px; padding-top: 12px; }
  #screen-shipping-document-mgmt .shipping-document-section-head { gap: 12px; margin-bottom: 10px; }
  #screen-shipping-document-mgmt .shipping-document-ready-state { font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-guidance { padding: 8px 10px; font-size: 12px; line-height: 1.6; }
  #screen-shipping-document-mgmt :is(.shipping-document-required-head, .shipping-document-required-row) { grid-template-columns: minmax(160px, .9fr) minmax(175px, 1.15fr) minmax(165px, 1fr) minmax(180px, 1.15fr); gap: 12px; }
  #screen-shipping-document-mgmt .shipping-document-required-head { min-height: 40px; padding: 8px; font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-required-row { min-height: 78px; padding: 12px 8px; }
  #screen-shipping-document-mgmt .shipping-document-name-cell { gap: 6px; }
  #screen-shipping-document-mgmt .shipping-document-name-cell > strong { font-size: 15px; word-break: keep-all; overflow-wrap: anywhere; }
  #screen-shipping-document-mgmt .shipping-document-standard { font-size: 14px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
  #screen-shipping-document-mgmt .shipping-document-standard small { font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-required-row em { max-width: 100%; min-width: 0; font-size: 12px; line-height: 1.6; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
  #screen-shipping-document-mgmt .shipping-document-row-actions { flex-wrap: wrap; gap: 8px; }
  #screen-shipping-document-mgmt .shipping-document-required-row button { min-height: 36px; padding: 7px 10px; font-size: 14px; line-height: 1.4; }
  #screen-shipping-document-mgmt .shipping-carrier-brand.compact { width: 130px; height: 34px; flex-basis: 130px; }
  #screen-shipping-document-mgmt .shipping-carrier-brand.compact .shipping-carrier-logo { width: 34px; height: 24px; flex-basis: 34px; }
  #screen-shipping-document-mgmt .shipping-carrier-brand-copy strong { font-size: 12px; white-space: nowrap; }
  #screen-shipping-document-mgmt .shipping-document-defaults { max-width: none; }
  #screen-shipping-document-mgmt .shipping-document-defaults-head h2 { font-size: 24px; }
  #screen-shipping-document-mgmt .shipping-document-defaults-head :is(span, p) { font-size: 12px; }
  #screen-shipping-document-mgmt :is(.shipping-document-default-head, .shipping-document-default-row) { grid-template-columns: minmax(160px, .8fr) minmax(210px, 1.25fr) minmax(190px, 1fr); gap: 14px; padding: 12px 8px; }
  #screen-shipping-document-mgmt .shipping-document-default-head,
  #screen-shipping-document-mgmt .shipping-document-default-row small { font-size: 12px; }
}
/* Keep the five document actions visible without shrinking the readable type. */
@media screen and (min-width: 1121px) {
  #screen-shipping-document-mgmt .shipping-document-toolbar { gap: 8px; padding: 10px 16px; }
  #screen-shipping-document-mgmt .shipping-document-title-block { grid-template-areas: "title actions"; }
  #screen-shipping-document-mgmt .shipping-document-title-block :is(.sales-order-kicker, p) { display: none; }
  #screen-shipping-document-mgmt .shipping-document-detail-pane { padding: 8px 18px; }
  #screen-shipping-document-mgmt .shipping-document-detail-head { gap: 12px; padding-bottom: 8px; }
  #screen-shipping-document-mgmt .shipping-document-detail-head > div:first-child { flex: 1; display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "label number customer" "target target target"; align-items: center; gap: 2px 10px; }
  #screen-shipping-document-mgmt .shipping-document-detail-head .shipping-document-order-id-label { grid-area: label; margin: 0; white-space: nowrap; }
  #screen-shipping-document-mgmt .shipping-document-detail-head h2 { grid-area: number; margin: 0; }
  #screen-shipping-document-mgmt .shipping-document-detail-head strong { grid-area: customer; margin: 0; }
  #screen-shipping-document-mgmt .shipping-document-detail-target { grid-area: target; margin: 0; }
  #screen-shipping-document-mgmt .shipping-document-stages > div { padding: 6px 10px; }
  #screen-shipping-document-mgmt .shipping-document-delivery { padding: 7px 0; }
  #screen-shipping-document-mgmt .shipping-document-delivery-head { margin-bottom: 5px; }
  #screen-shipping-document-mgmt .shipping-document-destination-card,
  #screen-shipping-document-mgmt .shipping-document-delivery-facts > div { padding-top: 7px; padding-bottom: 7px; }
  #screen-shipping-document-mgmt .shipping-document-order-contents { padding: 6px 0; }
  #screen-shipping-document-mgmt .shipping-document-order-contents-head { margin-bottom: 3px; }
  #screen-shipping-document-mgmt .shipping-document-order-items { max-height: 100px; overflow-y: auto; }
  #screen-shipping-document-mgmt .shipping-document-order-item { min-height: 46px; padding: 3px 8px; }
  #screen-shipping-document-mgmt .shipping-document-section { margin-top: 8px; padding-top: 8px; }
  #screen-shipping-document-mgmt .shipping-document-section-head { align-items: center; margin-bottom: 6px; }
  #screen-shipping-document-mgmt .shipping-document-guidance { padding: 5px 8px; }
  #screen-shipping-document-mgmt .shipping-document-required-head { min-height: 32px; padding: 5px 8px; }
  #screen-shipping-document-mgmt .shipping-document-required-row { min-height: 56px; padding: 6px 8px; }
  #screen-shipping-document-mgmt .shipping-document-name-cell { gap: 3px; }
  #screen-shipping-document-mgmt .shipping-document-row-actions { gap: 6px; }
  #screen-shipping-document-mgmt .shipping-carrier-brand.compact { height: 30px; }
}
@media screen and (min-width: 1200px) {
  #screen-shipping-document-mgmt :is(.shipping-document-required-head, .shipping-document-required-row) { grid-template-columns: minmax(160px, .9fr) minmax(175px, 1.15fr) minmax(165px, 1fr) minmax(248px, 1.4fr); }
}
@media screen and (max-width: 1199px) {
  #screen-shipping-document-mgmt .shipping-document-filter-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #screen-shipping-document-mgmt .shipping-document-filter-row > input { grid-column: 1 / 3; }
  #screen-shipping-document-mgmt .shipping-document-filter-row > button { grid-column: 3 / 5; }
}
@media screen and (max-width: 1120px) {
  #screen-shipping-document-mgmt.active { height: auto; min-height: 100dvh; overflow: visible; }
  #screen-shipping-document-mgmt .shipping-document-mgmt-body { overflow: visible; }
  #screen-shipping-document-mgmt .shipping-document-workspace { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  #screen-shipping-document-mgmt .shipping-document-list { max-height: 330px; }
  #screen-shipping-document-mgmt .shipping-document-list-pane { border-right: 0; border-bottom: 6px solid #e4e8ec; }
  #screen-shipping-document-mgmt .shipping-document-detail-pane { overflow: visible; }
  #screen-shipping-document-mgmt .shipping-document-title-block { grid-template-columns: minmax(0, 1fr); grid-template-areas: "kicker" "title" "copy" "actions"; }
  #screen-shipping-document-mgmt .shipping-document-title-actions { margin-top: 12px; justify-content: flex-start; }
}
@media screen and (max-width: 820px) {
  #screen-shipping-document-mgmt .shipping-document-toolbar { padding: 14px 12px; }
  #screen-shipping-document-mgmt .shipping-document-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #screen-shipping-document-mgmt .shipping-document-filter-row > input,
  #screen-shipping-document-mgmt .shipping-document-filter-row > button { grid-column: 1 / -1; }
  #screen-shipping-document-mgmt .shipping-document-title-actions :is(a, button) { flex: 1 0 auto; }
  #screen-shipping-document-mgmt .shipping-document-detail-pane { padding: 16px 12px 24px; }
  #screen-shipping-document-mgmt .shipping-document-detail-head { align-items: stretch; flex-direction: column; }
  #screen-shipping-document-mgmt .shipping-document-delivery-grid,
  #screen-shipping-document-mgmt .shipping-document-delivery-facts { grid-template-columns: 1fr; }
  #screen-shipping-document-mgmt .shipping-document-delivery-facts { border-top: 1px solid #dbe1e6; border-left: 0; }
  #screen-shipping-document-mgmt .shipping-document-delivery-facts > div { border-right: 0; border-bottom: 1px solid #e3e7ea; }
  #screen-shipping-document-mgmt .shipping-document-delivery-facts > div:last-child { border-bottom: 0; }
  #screen-shipping-document-mgmt .shipping-document-order-item { grid-template-columns: minmax(0, 1fr) auto; }
  #screen-shipping-document-mgmt .shipping-document-order-quantity { grid-column: 1; }
  #screen-shipping-document-mgmt .shipping-document-order-core { grid-column: 2; justify-self: end; }
  #screen-shipping-document-mgmt .shipping-document-required-head { display: none; }
  #screen-shipping-document-mgmt .shipping-document-required-row { grid-template-columns: minmax(0, 1fr) minmax(140px, 1fr); grid-template-areas: "name state" "standard standard" "actions actions"; gap: 10px 12px; padding: 14px 0; }
  #screen-shipping-document-mgmt .shipping-document-required-row .shipping-document-name-cell { grid-area: name; }
  #screen-shipping-document-mgmt .shipping-document-required-row .shipping-document-standard { grid-area: standard; }
  #screen-shipping-document-mgmt .shipping-document-state-cell { grid-area: state; justify-self: end; }
  #screen-shipping-document-mgmt .shipping-document-required-row .shipping-document-row-actions { grid-area: actions; }
  #screen-shipping-document-mgmt .shipping-document-row-actions button { flex: 1 0 auto; }
  #screen-shipping-document-mgmt .shipping-document-default-head { display: none; }
  #screen-shipping-document-mgmt .shipping-document-default-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

@media screen {
  #screen-shipping-document-mgmt .shipping-document-required-list { border-top: 2px solid #b8c5d0; }
  #screen-shipping-document-mgmt .shipping-document-required-head { background: #e8eef3; color: #33485b; font-weight: 800; }
  #screen-shipping-document-mgmt .shipping-document-required-row { --document-state-bg: #eef1f4; --document-state-border: #b9c4cc; --document-state-ink: #52616c; background: #fff; border-bottom-color: #cdd7df; box-shadow: inset 3px 0 0 var(--document-state-border); }
  #screen-shipping-document-mgmt .shipping-document-required-row:nth-child(odd) { background: #f6f8fa; }
  #screen-shipping-document-mgmt .shipping-document-required-row[data-state="success"] { --document-state-bg: #eaf5ef; --document-state-border: #8fc1a2; --document-state-ink: #185b3a; }
  #screen-shipping-document-mgmt .shipping-document-required-row[data-state="warning"] { --document-state-bg: #fff7df; --document-state-border: #d9ad43; --document-state-ink: #72510b; }
  #screen-shipping-document-mgmt .shipping-document-required-row[data-state="processing"] { --document-state-bg: #edf4ff; --document-state-border: #9dbbe5; --document-state-ink: #24558f; }
  #screen-shipping-document-mgmt .shipping-document-required-row[data-state="danger"] { --document-state-bg: #fff0ed; --document-state-border: #dc968d; --document-state-ink: #aa2f25; }
  #screen-shipping-document-mgmt .shipping-document-required-row > [role="cell"] { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; position: relative; min-width: 0; }
  #screen-shipping-document-mgmt .shipping-document-required-row > [role="cell"] + [role="cell"]::before { content: ""; position: absolute; top: 0; bottom: 0; left: -7px; border-left: 1px solid #dce3e9; pointer-events: none; }
  #screen-shipping-document-mgmt .shipping-document-required-row > .shipping-document-row-actions { flex-direction: row; align-items: center; justify-content: flex-end; }
  #screen-shipping-document-mgmt .shipping-document-name-cell > .shipping-carrier-brand.compact { flex: 0 0 auto; }
  #screen-shipping-document-mgmt .shipping-document-standard > strong { font-size: 14px; color: #253a4c; }
  #screen-shipping-document-mgmt .shipping-document-standard .shipping-document-standard-detail { margin-top: 2px; font-size: 12px; line-height: 1.4; color: #52616c; font-weight: 500; }
  #screen-shipping-document-mgmt .shipping-document-standard .shipping-document-temporary-note { color: #865807; font-size: 12px; }
  #screen-shipping-document-mgmt .shipping-document-state-cell { gap: 3px; }
  #screen-shipping-document-mgmt .shipping-document-state-cell > small { color: #52616c; font-size: 12px; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
  #screen-shipping-document-mgmt .shipping-document-required-row .shipping-document-state-badge { border-color: var(--document-state-border); background: var(--document-state-bg); color: var(--document-state-ink); font-size: 14px; line-height: 1.3; padding: 3px 8px; }
}
@media screen and (max-width: 820px) {
  #screen-shipping-document-mgmt .shipping-document-required-row { padding-left: 10px; padding-right: 10px; }
  #screen-shipping-document-mgmt .shipping-document-required-row > [role="cell"] + [role="cell"]::before { display: none; }
  #screen-shipping-document-mgmt .shipping-document-required-row > .shipping-document-state-cell { align-items: flex-end; }
}

/* Keep selected shipment items and document actions in the order detail. */
@media screen and (min-width: 1121px) {
  #screen-shipping-document-mgmt .shipping-document-detail-head { align-items: center; padding-bottom: 6px; }
  #screen-shipping-document-mgmt .shipping-document-lookup-message:empty { display: none; }
  #screen-shipping-document-mgmt .shipping-document-detail-head .sales-order-workspace-switch { flex: 0 0 auto; border-bottom: 0; padding: 0; }
  #screen-shipping-document-mgmt .shipping-document-order-contents { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 10px; padding: 5px 8px; background: #f3f7fb; }
  #screen-shipping-document-mgmt .shipping-document-order-contents-head { display: block; margin: 0; }
  #screen-shipping-document-mgmt .shipping-document-order-contents-head > span { display: block; margin-top: 2px; }
  #screen-shipping-document-mgmt .shipping-document-order-items { max-height: 100px; overflow-y: auto; }
  #screen-shipping-document-mgmt .shipping-document-order-core { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  #screen-shipping-document-mgmt .shipping-document-order-items:focus-visible { outline: 2px solid #287356; outline-offset: -2px; }
  #screen-shipping-document-mgmt .shipping-document-order-item { grid-template-columns: minmax(155px, 1fr) minmax(100px, .6fr) 64px 150px; gap: 8px; padding: 3px 0; }
  #screen-shipping-document-mgmt .shipping-document-required-documents { display: flex; flex-direction: column; }
  #screen-shipping-document-mgmt .shipping-document-required-documents .shipping-document-required-list { order: 1; }
  #screen-shipping-document-mgmt .shipping-document-required-documents .shipping-document-guidance { order: 2; }
}

/* Keep order facts together; progress is a separate summary beside them. */
@media screen {
  #screen-shipping-document-mgmt #shipping-document-message:empty { display: none; }
  #screen-shipping-document-mgmt .shipping-document-order-summary { display: grid; grid-template-columns: minmax(0, 1fr) 224px; align-items: start; gap: 14px; padding-top: 10px; }
  #screen-shipping-document-mgmt .shipping-document-order-summary .shipping-document-order-contents { display: block; min-width: 0; padding: 8px 10px; border: 1px solid #dbe1e6; border-radius: 5px; background: #f7f9fb; }
  #screen-shipping-document-mgmt .shipping-document-order-summary .shipping-document-order-contents-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
  #screen-shipping-document-mgmt .shipping-document-order-summary .shipping-document-order-contents-head > span { margin: 0; white-space: nowrap; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel { min-width: 0; border: 1px solid #dbe1e6; border-radius: 5px; padding: 6px 10px; background: #fff; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel h3 { color: #52606d; font-size: 14px; line-height: 1.5; margin: 0 0 2px; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel .shipping-document-stages { display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 0; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel .shipping-document-stages > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 8px; padding: 1px 0; border: 0; border-bottom: 1px solid #e8edf0; background: transparent; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel .shipping-document-stages > div:last-child { border-bottom: 0; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel .shipping-document-stages span { font-size: 12px; line-height: 1.5; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel .shipping-document-stages strong { margin: 0; max-width: 110px; font-size: 14px; line-height: 1.5; text-align: right; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel .shipping-document-stages small { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.5; }
}
@media screen and (min-width: 1121px) {
  #screen-shipping-document-mgmt .shipping-document-order-summary .shipping-document-order-item { grid-template-columns: minmax(135px, 1fr) minmax(90px, .6fr) 52px 150px; }
}
@media screen and (max-width: 1120px) {
  #screen-shipping-document-mgmt .shipping-document-order-summary { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding-top: 12px; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel .shipping-document-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel .shipping-document-stages[data-stage-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #screen-shipping-document-mgmt .shipping-document-progress-panel .shipping-document-stages > div { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; border-bottom: 0; padding: 4px 0; }
  #screen-shipping-document-mgmt .shipping-document-progress-panel .shipping-document-stages strong { max-width: 100%; text-align: left; }
}

/* Match order operations to the readable type scale used by shipping documents. */
@media screen {
  #screen-sales-order-mgmt { font-size: 14px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-mgmt-body :where(div, span, strong, small, p, em, label, a, button, input, select, summary, dt, dd, time) { font-size: inherit; }
  #screen-sales-order-mgmt .page-header-left { flex-wrap: wrap; }
  #screen-sales-order-mgmt .page-header :is(button, .header-username, .role-badge, .app-version) { font-size: 12px; }
  #screen-sales-order-mgmt .page-header .logo-text { font-size: 18px; }

  #screen-sales-order-mgmt .sales-order-toolbar { display: flex; align-items: stretch; flex-direction: column; gap: 12px; padding: 14px 16px; }
  #screen-sales-order-mgmt .sales-order-title-block { min-width: 0; }
  #screen-sales-order-mgmt .sales-order-kicker { font-size: 12px; letter-spacing: 0; }
  #screen-sales-order-mgmt .sales-order-toolbar h1 { margin-top: 0; font-size: 24px; line-height: 1.3; }
  #screen-sales-order-mgmt .sales-order-toolbar p { display: block; max-width: 520px; margin-top: 3px; font-size: 12px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-filter-row { gap: 8px; }
  #screen-sales-order-mgmt .sales-order-search-controls { grid-template-columns: minmax(250px, 1fr) 150px auto; gap: 8px; }
  #screen-sales-order-mgmt .sales-order-filter-row :is(input, select, button),
  #screen-sales-order-mgmt .sales-order-help-link,
  #screen-sales-order-mgmt .sales-order-data-actions > summary { height: 40px; min-height: 40px; padding-right: 12px; padding-left: 12px; font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-selection-controls { gap: 8px; }
  #screen-sales-order-mgmt .sales-order-selection-summary { min-width: 76px; min-height: 30px; padding: 3px 8px; font-size: 12px; }
  #screen-sales-order-mgmt .sales-order-data-actions > div { width: 220px; gap: 6px; padding: 8px; }
  #screen-sales-order-mgmt .sales-order-data-actions > div > button { min-height: 40px; font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-batch-message { min-height: 18px; font-size: 12px; line-height: 1.5; }

  #screen-sales-order-mgmt .sales-order-auto-print { min-height: 64px; padding: 10px 14px; }
  #screen-sales-order-mgmt .sales-order-auto-print-heading { gap: 6px; }
  #screen-sales-order-mgmt .sales-order-auto-print-heading > strong { font-size: 14px; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
  #screen-sales-order-mgmt .sales-order-auto-print-scope { font-size: 12px; line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-auto-print-state { min-height: 26px; padding: 3px 8px; font-size: 12px; line-height: 1.35; }
  #screen-sales-order-mgmt .sales-order-print-settings-button { min-height: 40px; padding: 7px 11px; font-size: 14px; }

  #screen-sales-order-mgmt .sales-order-dashboard { gap: 12px; min-height: 64px; padding: 8px 14px; }
  #screen-sales-order-mgmt .sales-order-dashboard-heading { min-width: 92px; }
  #screen-sales-order-mgmt .sales-order-dashboard-heading strong { font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-dashboard-heading span { margin-top: 2px; font-size: 12px; line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-dashboard-metrics { gap: 7px; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric { min-height: 50px; gap: 8px; padding: 7px 9px; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric span { overflow: visible; font-size: 12px; line-height: 1.35; text-overflow: clip; white-space: nowrap; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric strong { font-size: 20px; }

  #screen-sales-order-mgmt .sales-order-workspace { grid-template-columns: minmax(360px, 390px) minmax(0, 1fr); }
  #screen-sales-order-mgmt .sales-order-list-head { min-height: 46px; height: auto; padding: 10px 12px; gap: 8px; font-size: 13px; }
  #screen-sales-order-mgmt .sales-order-list-row { grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 7px 10px; min-height: 82px; padding: 8px 10px; }
  #screen-sales-order-mgmt .sales-order-check input { width: 18px; height: 18px; }
  #screen-sales-order-mgmt .sales-order-list-number { overflow: visible; font-size: 16px; line-height: 1.35; text-overflow: clip; white-space: nowrap; }
  #screen-sales-order-mgmt .sales-order-list-total { gap: 5px; }
  #screen-sales-order-mgmt .sales-order-list-total small { font-size: 12px; line-height: 1.35; }
  #screen-sales-order-mgmt .sales-order-list-total strong { font-size: 14px; line-height: 1.35; }
  #screen-sales-order-mgmt .sales-order-list-customer { overflow: hidden; margin-top: 1px; font-size: 14px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
  #screen-sales-order-mgmt .sales-order-list-context { gap: 6px; margin-top: 1px; }
  #screen-sales-order-mgmt .sales-order-list-meta { align-items: baseline; flex-wrap: nowrap; gap: 5px; margin-top: 0; }
  #screen-sales-order-mgmt .sales-order-source { font-size: 12px; line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-queue-heading { min-height: 38px; padding: 6px 12px 6px 10px; }
  #screen-sales-order-mgmt .sales-order-queue-heading strong { font-size: 14px; line-height: 1.35; }
  #screen-sales-order-mgmt .sales-order-queue-heading span { font-size: 12px; }
  #screen-sales-order-mgmt .sales-order-list-next { gap: 4px; margin-top: 0; }
  #screen-sales-order-mgmt .sales-order-list-next span { font-size: 12px; }
  #screen-sales-order-mgmt .sales-order-list-next strong { font-size: 13px; line-height: 1.4; }

  #screen-sales-order-mgmt .sales-order-detail-pane { padding: 0 18px 28px; }
  #screen-sales-order-mgmt .sales-order-empty { font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-empty-guidance strong { font-size: 18px; }
  #screen-sales-order-mgmt .sales-order-empty-guidance span { font-size: 12px; line-height: 1.6; }
  #screen-sales-order-mgmt .sales-order-detail-head { flex: 0 0 auto; min-height: 108px; gap: 16px; padding: 12px 0; }
  #screen-sales-order-mgmt .sales-order-detail-meta { min-height: 22px; flex-wrap: wrap; }
  #screen-sales-order-mgmt .sales-order-detail-meta > span { font-size: 12px; }
  #screen-sales-order-mgmt .sales-order-detail-head h2 { margin-top: 2px; font-size: 24px; line-height: 1.3; }
  #screen-sales-order-mgmt .sales-order-detail-head .sales-order-detail-identity > strong { margin-top: 2px; font-size: 16px; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
  #screen-sales-order-mgmt .sales-order-progress-step { grid-template-columns: 24px minmax(0, 1fr); gap: 5px; padding: 7px 4px 0; }
  #screen-sales-order-mgmt .sales-order-progress-step > span { width: 22px; height: 22px; font-size: 12px; }
  #screen-sales-order-mgmt .sales-order-progress-step > strong { overflow: visible; font-size: 12px; line-height: 1.3; text-overflow: clip; white-space: nowrap; }
  #screen-sales-order-mgmt .sales-order-progress.cancelled > span,
  #screen-sales-order-mgmt .sales-order-progress.cancelled > strong { font-size: 12px; }
  #screen-sales-order-mgmt .sales-order-detail-state { gap: 10px; }
  #screen-sales-order-mgmt .sales-order-detail-next-actions { gap: 8px; padding-left: 12px; }
  #screen-sales-order-mgmt .sales-order-detail-next-actions > span,
  #screen-sales-order-mgmt .sales-order-detail-next-actions > strong { font-size: 12px; line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-detail-next-actions .sales-order-action,
  #screen-sales-order-mgmt .sales-order-secondary-actions > summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 38px;
    padding: 7px 32px 7px 11px;
    font-size: 14px;
    line-height: 1.4;
  }
  #screen-sales-order-mgmt .sales-order-secondary-actions > summary::after {
    top: 50%;
    right: 11px;
    transform: translateY(-50%);
  }
  #screen-sales-order-mgmt .sales-order-secondary-actions > summary > span { min-width: 0; }
  #screen-sales-order-mgmt .sales-order-secondary-actions > div button { min-height: 38px; font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-detail-state-summary { gap: 12px; }
  #screen-sales-order-mgmt .sales-order-detail-total span { font-size: 12px; line-height: 1.35; }
  #screen-sales-order-mgmt .sales-order-detail-total strong { font-size: 18px; line-height: 1.35; }
  #screen-sales-order-mgmt .sales-order-detail-nav { flex: 0 0 auto; min-height: 44px; }
  #screen-sales-order-mgmt .sales-order-detail-nav button { min-height: 44px; padding: 8px 14px; font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-detail-panel { padding: 14px 1px 22px; }
  #screen-sales-order-mgmt .sales-order-detail-overview { overflow-y: auto; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid { grid-template-columns: minmax(0, 1fr); height: auto; gap: 18px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid > .sales-order-detail-section { margin-top: 0; padding-top: 14px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid > .sales-order-detail-section:first-child { border-right: 0; padding-right: 0; }
  #screen-sales-order-mgmt .sales-order-section-heading { align-items: flex-end; gap: 12px; margin-bottom: 10px; }
  #screen-sales-order-mgmt .sales-order-section-heading h3,
  #screen-sales-order-mgmt .sales-order-detail-section h3 { font-size: 16px; line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-section-heading p { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-pricing-open { min-height: 38px; padding: 7px 11px; font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-accounting-panel { gap: 16px; }
  #screen-sales-order-mgmt .sales-order-accounting-panel-status { min-height: 32px; padding: 5px 10px; font-size: 12px; }
  #screen-sales-order-mgmt .sales-order-accounting-facts dt { font-size: 12px; }
  #screen-sales-order-mgmt .sales-order-accounting-facts dd { margin-top: 5px; font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-accounting-open { min-height: 40px; padding: 8px 16px; font-size: 14px; }

  #screen-sales-order-mgmt .sales-order-item-head,
  #screen-sales-order-mgmt .sales-order-item-row { grid-template-columns: minmax(240px, 1.75fr) minmax(120px, .75fr) 72px 120px 128px; min-width: 740px; gap: 10px; padding: 10px; }
  #screen-sales-order-mgmt .sales-order-item-head { font-size: 12px; line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-item-row { min-height: 64px; font-size: 15px; line-height: 1.45; }
  #screen-sales-order-mgmt .sales-order-item-row > div small { margin-top: 2px; font-size: 12px; line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-core-charge-row { min-height: 52px; }
  #screen-sales-order-mgmt .sales-order-total-row > strong:nth-child(5) { font-size: 18px; }

  #screen-sales-order-mgmt .sales-order-address { grid-template-columns: minmax(280px, 1.1fr) minmax(220px, .72fr) minmax(280px, 1fr); gap: 14px 16px; }
  #screen-sales-order-mgmt .sales-order-address-destination { grid-column: 1; grid-row: 2; }
  #screen-sales-order-mgmt .sales-order-address dl { grid-column: 2; grid-row: 2; }
  #screen-sales-order-mgmt .sales-order-vehicle-information { grid-column: 1 / -1; grid-row: 3; }
  #screen-sales-order-mgmt .sales-order-address-destination { gap: 5px; padding: 11px 12px; }
  #screen-sales-order-mgmt .sales-order-address-destination strong { font-size: 15px; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
  #screen-sales-order-mgmt .sales-order-address-destination span,
  #screen-sales-order-mgmt .sales-order-address p { font-size: 14px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
  #screen-sales-order-mgmt .sales-order-address dl > div { grid-template-columns: 100px minmax(0, 1fr); gap: 10px; }
  #screen-sales-order-mgmt .sales-order-address dt { font-size: 12px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-address dd,
  #screen-sales-order-mgmt .sales-order-waybill-detail strong { font-size: 14px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-waybill-detail span { font-size: 12px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-vehicle-information :is(h4, dt) { font-size: 12px; }
  #screen-sales-order-mgmt .sales-order-vehicle-information dd { font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-shipping-schedule label,
  #screen-sales-order-mgmt .sales-order-shipping-schedule small,
  #screen-sales-order-mgmt .sales-order-shipping-schedule-locked { font-size: 12px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-shipping-schedule { grid-column: 3; grid-row: 2; grid-template-columns: minmax(0, 1fr); align-content: start; align-items: stretch; min-width: 0; gap: 8px; }
  #screen-sales-order-mgmt .sales-order-shipping-schedule :is(input, button) { width: 100%; }
  #screen-sales-order-mgmt .sales-order-shipping-schedule small { grid-column: 1; }
  #screen-sales-order-mgmt .sales-order-shipping-schedule :is(input, button) { min-height: 40px; font-size: 14px; }

  #screen-sales-order-mgmt .sales-order-tracking-grid label span,
  #screen-sales-order-mgmt .sales-order-waybill-progress-editor > p,
  #screen-sales-order-mgmt .sales-order-waybill-progress-note { font-size: 12px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-tracking-grid :is(input, button) { min-height: 40px; font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-dispatch-head p,
  #screen-sales-order-mgmt .sales-order-dispatch-status,
  #screen-sales-order-mgmt .sales-order-dispatch-summary span,
  #screen-sales-order-mgmt .sales-order-waybill-progress-heading p,
  #screen-sales-order-mgmt .sales-order-waybill-progress-card dt,
  #screen-sales-order-mgmt .sales-order-waybill-progress-status,
  #screen-sales-order-mgmt .sales-order-dispatch-empty { font-size: 12px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-dispatch-summary strong,
  #screen-sales-order-mgmt .sales-order-waybill-progress-card-head > strong,
  #screen-sales-order-mgmt .sales-order-waybill-progress-card dd { font-size: 14px; line-height: 1.45; }
  #screen-sales-order-mgmt .sales-order-dispatch-serial-list code { font-size: 13px; line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-dispatch-serial-empty { font-size: 12px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-dispatch-actions button { min-height: 40px; padding: 7px 11px; font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-print-jobs-head > strong,
  #screen-sales-order-mgmt .sales-order-print-job strong { font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-print-jobs-head button { min-height: 36px; font-size: 13px; }
  #screen-sales-order-mgmt .sales-order-print-job > div span,
  #screen-sales-order-mgmt .sales-order-print-job > time,
  #screen-sales-order-mgmt .sales-order-print-job-status { font-size: 12px; line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-history-groups { gap: 20px; }
  #screen-sales-order-mgmt .sales-order-history-groups h4 { padding-bottom: 8px; font-size: 14px; line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-history-empty span { font-size: 12px; line-height: 1.5; }
  #screen-sales-order-mgmt .sales-order-history-row { grid-template-columns: 142px 112px minmax(220px, 1fr) minmax(190px, .82fr); gap: 14px; min-height: 66px; padding: 12px 10px; }
  #screen-sales-order-mgmt .sales-order-history-row time,
  #screen-sales-order-mgmt .sales-order-history-kind,
  #screen-sales-order-mgmt .sales-order-history-kind-cell .state,
  #screen-sales-order-mgmt .sales-order-history-content small,
  #screen-sales-order-mgmt .sales-order-history-result small { font-size: 12px; line-height: 1.45; }
  #screen-sales-order-mgmt .sales-order-history-content strong,
  #screen-sales-order-mgmt .sales-order-history-result strong { font-size: 14px; line-height: 1.45; }
  #screen-sales-order-mgmt .sales-order-history-file { word-break: normal; overflow-wrap: anywhere; }
  #screen-sales-order-mgmt .sales-order-detail-message { min-height: 20px; margin-top: 8px; font-size: 12px; line-height: 1.5; }
}

@media screen and (min-width: 1081px) {
  #screen-sales-order-mgmt .sales-order-mgmt-body { grid-template-columns: minmax(360px, 390px) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  #screen-sales-order-mgmt .sales-order-toolbar { min-height: 0; }
  #screen-sales-order-mgmt .sales-order-auto-print { min-height: 68px; }
  #screen-sales-order-mgmt .sales-order-auto-print-heading { align-items: flex-start; flex-direction: column; }
  #screen-sales-order-mgmt .sales-order-dashboard { min-height: 68px; }
  #screen-sales-order-mgmt .sales-order-dashboard-heading span { display: none; }
  #screen-sales-order-mgmt .sales-order-list-head { flex: 0 0 46px; height: 46px; }
  #screen-sales-order-mgmt .sales-order-detail-head { grid-template-columns: minmax(190px, .65fr) minmax(310px, 1.15fr) auto; }
}

@media screen and (min-width: 1200px) {
  #screen-sales-order-mgmt .sales-order-mgmt-body { grid-template-columns: 330px minmax(0, 1fr); }
  #screen-sales-order-mgmt .sales-order-workspace { grid-template-columns: 330px minmax(0, 1fr); }
  #screen-sales-order-mgmt .sales-order-toolbar { display: block; padding: 10px 16px; }
  #screen-sales-order-mgmt .sales-order-title-block { display: none; }
  #screen-sales-order-mgmt .sales-order-filter-row { grid-template-columns: auto minmax(360px, 1fr) auto auto; }
  #screen-sales-order-mgmt .sales-order-filter-row > .sales-order-secondary-actions { grid-column: 1 / -1; justify-self: stretch; }
  #screen-sales-order-mgmt .sales-order-data-actions > div { right: auto; left: 0; }
  #screen-sales-order-mgmt .sales-order-auto-print,
  #screen-sales-order-mgmt .sales-order-dashboard { min-height: 56px; }
  #screen-sales-order-mgmt .sales-order-auto-print { gap: 8px; padding: 5px 10px; }
  #screen-sales-order-mgmt .sales-order-auto-print-heading { gap: 2px; }
  #screen-sales-order-mgmt .sales-order-auto-print-heading > strong { white-space: nowrap; }
  #screen-sales-order-mgmt .sales-order-auto-print-state { min-height: 22px; }
  #screen-sales-order-mgmt .sales-order-print-settings-button { min-height: 36px; padding: 6px 8px; font-size: 13px; }
  #screen-sales-order-mgmt .sales-order-dashboard { padding-top: 5px; padding-bottom: 5px; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric { min-height: 44px; padding-top: 4px; padding-bottom: 4px; }

  #screen-sales-order-mgmt .sales-order-detail-head { min-height: 0; row-gap: 6px; padding: 8px 0; }
  #screen-sales-order-mgmt .sales-order-detail-meta { min-height: 0; line-height: 1.3; }
  #screen-sales-order-mgmt .sales-order-detail-head h2 { line-height: 1.15; }
  #screen-sales-order-mgmt .sales-order-detail-head .sales-order-detail-identity > strong { line-height: 1.3; }
  #screen-sales-order-mgmt .sales-order-detail-overview { overflow-y: auto; padding-bottom: 12px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid { grid-template-columns: minmax(0, 1fr); align-items: start; height: auto; gap: 12px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid > .sales-order-detail-section { padding-top: 10px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid > .sales-order-detail-section:first-child { border-right: 0; padding-right: 0; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-section-heading { margin-bottom: 8px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-section-heading p { display: block; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-item-table { overflow-x: auto; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-item-head,
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-item-row { grid-template-columns: minmax(240px, 1.75fr) minmax(120px, .75fr) 72px 120px 128px; min-width: 740px; gap: 10px; padding: 8px 10px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-item-row { min-height: 60px; font-size: 14px; }

  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-address { grid-template-columns: minmax(280px, 1.1fr) minmax(220px, .72fr) minmax(280px, 1fr); align-content: start; gap: 9px 12px; padding-top: 10px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-address .sales-order-section-heading { grid-column: 1 / -1; grid-row: 1; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-address-destination { grid-column: 1; grid-row: 2; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-address-destination strong { line-height: 1.35; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-address-destination span { line-height: 1.45; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-address dl { grid-column: 2; grid-row: 2; gap: 5px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-address dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-waybill-detail strong { line-height: 1.35; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-waybill-detail span { line-height: 1.4; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-vehicle-information { grid-column: 1 / -1; grid-row: 3; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-shipping-schedule { grid-column: 3; grid-row: 2; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px 10px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-shipping-schedule label { grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 5px; }
  #screen-sales-order-mgmt .sales-order-detail-overview-grid .sales-order-shipping-schedule small { display: none; }
}

@media screen and (max-width: 1199px) {
  #screen-sales-order-mgmt .sales-order-title-block { flex: none; }
  #screen-sales-order-mgmt .sales-order-filter-row { grid-template-columns: auto minmax(300px, 1fr) auto; }
  #screen-sales-order-mgmt .sales-order-new-order-button { grid-column: 1; grid-row: 1; }
  #screen-sales-order-mgmt .sales-order-search-controls { grid-column: 2; grid-row: 1; }
  #screen-sales-order-mgmt .sales-order-selection-controls { grid-column: 1 / 3; grid-row: 2; justify-self: start; }
  #screen-sales-order-mgmt .sales-order-secondary-actions { grid-column: 3; grid-row: 1; }
  #screen-sales-order-mgmt .sales-order-batch-message { grid-row: 3; }
}

@media screen and (max-width: 1359px) and (min-width: 821px) {
  #screen-sales-order-mgmt .sales-order-detail-head { grid-template-columns: minmax(0, 1fr) auto; }
  #screen-sales-order-mgmt .sales-order-detail-identity { grid-column: 1; grid-row: 1; }
  #screen-sales-order-mgmt .sales-order-progress { grid-column: 1 / -1; grid-row: 2; }
  #screen-sales-order-mgmt .sales-order-detail-state { grid-column: 2; grid-row: 1; }
}

@media screen and (max-width: 1199px) and (min-width: 821px) {
  #screen-sales-order-mgmt .sales-order-dashboard-metric { align-items: stretch; flex-direction: column; gap: 2px; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric strong { align-self: flex-end; }
}

@media screen and (max-width: 820px) {
  #screen-sales-order-mgmt .sales-order-mgmt-body { display: block; overflow: visible; }
  #screen-sales-order-mgmt .sales-order-toolbar { padding: 14px 12px; }
  #screen-sales-order-mgmt .sales-order-filter-row { grid-template-columns: 1fr; }
  #screen-sales-order-mgmt :is(.sales-order-new-order-button, .sales-order-search-controls, .sales-order-selection-controls, .sales-order-secondary-actions, .sales-order-batch-message) { grid-column: 1; grid-row: auto; }
  #screen-sales-order-mgmt .sales-order-search-controls { grid-template-columns: 1fr; }
  #screen-sales-order-mgmt .sales-order-search-controls :is(input, select, button) { grid-column: 1; width: 100%; }
  #screen-sales-order-mgmt .sales-order-selection-controls { display: grid; grid-template-columns: 1fr; width: 100%; border-left: 0; padding-left: 0; }
  #screen-sales-order-mgmt .sales-order-selection-summary { grid-column: 1 / -1; justify-self: start; }
  #screen-sales-order-mgmt .sales-order-selection-controls button { width: 100%; white-space: normal; }
  #screen-sales-order-mgmt .sales-order-secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-self: stretch; }
  #screen-sales-order-mgmt .sales-order-data-actions { position: static; }
  #screen-sales-order-mgmt .sales-order-data-actions > summary { width: 100%; }
  #screen-sales-order-mgmt .sales-order-data-actions > div { right: auto; left: 0; width: 100%; }
  #screen-sales-order-mgmt .sales-order-dashboard { grid-template-columns: 1fr; padding: 10px 12px; }
  #screen-sales-order-mgmt .sales-order-dashboard-heading span { display: block; }
  #screen-sales-order-mgmt .sales-order-dashboard-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding-bottom: 0; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric { flex: none; min-width: 0; }
  #screen-sales-order-mgmt .sales-order-workspace { display: block; min-height: 0; overflow: visible; }
  #screen-sales-order-mgmt .sales-order-list-pane { min-height: 0; }
  #screen-sales-order-mgmt .sales-order-list { height: auto; max-height: 46vh; overflow-y: auto; }
  #screen-sales-order-mgmt .sales-order-detail-pane { padding: 0 12px 24px; overflow: visible; }
  #screen-sales-order-mgmt .sales-order-detail-head { grid-template-columns: 1fr; align-items: stretch; min-height: 0; gap: 14px; padding: 16px 0; }
  .sales-order-workspace-switch { justify-content: stretch; min-height: 48px; padding: 7px 0; }
  .sales-order-workspace-switch > button,
  .sales-order-workspace-switch > span { flex: 1 1 50%; min-width: 0; min-height: 38px; padding-right: 7px; padding-left: 7px; font-size: 13px; }
  #screen-sales-order-mgmt .sales-order-progress { grid-template-columns: repeat(5, minmax(92px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
  #screen-sales-order-mgmt .sales-order-detail-state { align-items: stretch; justify-content: flex-start; flex-direction: column; }
  #screen-sales-order-mgmt .sales-order-detail-state-summary { justify-content: space-between; }
  #screen-sales-order-mgmt .sales-order-detail-next-actions { align-items: stretch; flex-direction: column; border-left: 0; padding-left: 0; }
  #screen-sales-order-mgmt .sales-order-detail-next-actions > div { justify-content: stretch; }
  #screen-sales-order-mgmt .sales-order-detail-next-actions .sales-order-action { flex: 1 1 auto; white-space: normal; }
  #screen-sales-order-mgmt .sales-order-detail-nav { overflow-x: auto; }
  #screen-sales-order-mgmt .sales-order-detail-nav button { flex: 1 0 auto; justify-content: center; }
  #screen-sales-order-mgmt .sales-order-accounting-facts { grid-template-columns: 1fr; }
  #screen-sales-order-mgmt .sales-order-accounting-actions { align-items: stretch; }
  #screen-sales-order-mgmt .sales-order-accounting-open { width: 100%; }
  #screen-sales-order-mgmt .sales-order-address { grid-template-columns: 1fr; }
  #screen-sales-order-mgmt .sales-order-address .sales-order-section-heading,
  #screen-sales-order-mgmt .sales-order-address-destination,
  #screen-sales-order-mgmt .sales-order-address dl,
  #screen-sales-order-mgmt .sales-order-vehicle-information,
  #screen-sales-order-mgmt .sales-order-shipping-schedule { grid-column: 1; }
  #screen-sales-order-mgmt .sales-order-address-destination,
  #screen-sales-order-mgmt .sales-order-address dl,
  #screen-sales-order-mgmt .sales-order-vehicle-information,
  #screen-sales-order-mgmt .sales-order-shipping-schedule { grid-row: auto; }
  #screen-sales-order-mgmt .sales-order-shipping-schedule { grid-template-columns: 1fr; align-items: stretch; }
  #screen-sales-order-mgmt .sales-order-shipping-schedule :is(input, button) { width: 100%; }
  #screen-sales-order-mgmt .sales-order-tracking-grid,
  #screen-sales-order-mgmt .sales-order-tracking-grid.outbound-only { grid-template-columns: 1fr; align-items: stretch; }
  #screen-sales-order-mgmt .sales-order-dispatch-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #screen-sales-order-mgmt .sales-order-history-groups { grid-template-columns: 1fr; }
  #screen-sales-order-mgmt .sales-order-history-row {
    grid-template-columns: 132px minmax(0, 1fr);
    grid-template-areas:
      "time kind"
      "content content"
      "result result";
    gap: 8px 12px;
  }
  #screen-sales-order-mgmt .sales-order-history-row > time { grid-area: time; }
  #screen-sales-order-mgmt .sales-order-history-row > .sales-order-history-kind,
  #screen-sales-order-mgmt .sales-order-history-row > .sales-order-history-kind-cell { grid-area: kind; }
  #screen-sales-order-mgmt .sales-order-history-row > .sales-order-history-content { grid-area: content; }
  #screen-sales-order-mgmt .sales-order-history-row > .sales-order-history-result { grid-area: result; }
  #screen-sales-order-mgmt .sales-order-pricing-history-row .sales-order-history-kind { white-space: nowrap; }
}

/* Product Design audit: clarify hierarchy in the order operations workspace. */
@media screen {
  #screen-sales-order-mgmt .sales-order-toolbar { border-bottom-color: #cdd6dd; }
  #screen-sales-order-mgmt .sales-order-filter-row { align-items: center; }
  #screen-sales-order-mgmt .sales-order-selection-controls:has(.sales-order-selection-summary:not(.active)) { opacity: .78; }

  #screen-sales-order-mgmt .sales-order-auto-print {
    grid-template-columns: minmax(0, 1fr) max-content;
    border-bottom-color: #cfd8d3;
    background: #f5f8f6;
  }
  #screen-sales-order-mgmt .sales-order-auto-print-heading {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }
  #screen-sales-order-mgmt .sales-order-auto-print-heading > strong { min-width: 0; }
  #screen-sales-order-mgmt .sales-order-auto-print-state {
    flex: 0 1 auto;
    max-width: 100%;
    text-align: center;
    white-space: normal;
  }
  #screen-sales-order-mgmt .sales-order-print-settings-button { max-width: 100%; }
  #screen-sales-order-mgmt .sales-order-auto-print-scope { color: #66736d; }

  #screen-sales-order-mgmt .sales-order-dashboard { gap: 12px; border-bottom-color: #cdd6dd; background: #f8faf9; }
  #screen-sales-order-mgmt .sales-order-dashboard-heading { min-width: 88px; }
  #screen-sales-order-mgmt .sales-order-dashboard-metrics { gap: 0; overflow: hidden; border: 1px solid #cfd7dd; border-radius: 6px; background: #fff; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 44px;
    border: 0;
    border-left: 1px solid #dde3e7;
    border-radius: 0;
    padding: 4px 6px;
    background: #fff;
  }
  #screen-sales-order-mgmt .sales-order-dashboard-metric:first-child { border-left: 0; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric:hover { border-color: #dde3e7; background: #f6f8f9; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    overflow: visible;
    color: #596672;
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  #screen-sales-order-mgmt .sales-order-dashboard-metric span::before { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #7b8793; content: ""; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric.submitted span::before { background: #c88a22; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric.accepted span::before { background: #3d7fae; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric.shipping-ready span::before { background: #285f8b; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric.shipped span::before { background: #2f8252; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric.completed span::before { background: #5c7769; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric.cancelled span::before { background: #b55353; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric strong { align-self: flex-end; margin-left: 0; color: #26323d; font-size: 18px; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric.active { border-color: #dde3e7; box-shadow: inset 0 -3px 0 #287356; background: #eef7f2; }

  #screen-sales-order-mgmt .sales-order-detail-head { border-bottom: 1px solid #cfd7dd; }
  #screen-sales-order-mgmt .sales-order-detail-navigation { display: flex; flex: 0 0 auto; align-items: flex-end; justify-content: space-between; gap: 16px; min-width: 0; border-bottom: 1px solid #cfd7dd; }
  #screen-sales-order-mgmt .sales-order-detail-navigation .sales-order-detail-nav { flex: 1 1 auto; min-width: 0; border-bottom: 0; }
  #screen-sales-order-mgmt .sales-order-detail-navigation .sales-order-workspace-switch { flex: 0 0 auto; min-height: 44px; border-bottom: 0; padding: 5px 0; }
  #screen-sales-order-mgmt .sales-order-detail-navigation .sales-order-workspace-switch > button,
  #screen-sales-order-mgmt .sales-order-detail-navigation .sales-order-workspace-switch > span { min-height: 34px; padding: 5px 10px; font-size: 12px; }

  #screen-sales-order-mgmt .sales-order-dispatch { border-top: 0; padding-top: 4px; }
  #screen-sales-order-mgmt .sales-order-dispatch-head { align-items: center; }
  #screen-sales-order-mgmt .sales-order-dispatch-head h3 { margin: 0; }
  #screen-sales-order-mgmt .sales-order-dispatch-status { border-radius: 4px; }
  #screen-sales-order-mgmt .sales-order-dispatch-summary { overflow: hidden; margin-top: 8px; border-color: #d6dee4; border-radius: 5px; }
  #screen-sales-order-mgmt .sales-order-dispatch-summary > div { padding: 8px 12px; background: #f6f8f9; }
  #screen-sales-order-mgmt .sales-order-waybill-progress { margin-top: 10px; padding-top: 10px; }
  #screen-sales-order-mgmt .sales-order-waybill-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  #screen-sales-order-mgmt .sales-order-waybill-progress-heading h4 { margin: 0; }
  #screen-sales-order-mgmt .sales-order-waybill-progress-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
  #screen-sales-order-mgmt .sales-order-waybill-progress-card { border-radius: 5px; }
  #screen-sales-order-mgmt .sales-order-waybill-progress-card-head { padding: 8px 12px; }
  #screen-sales-order-mgmt .sales-order-waybill-progress-card dl > div { padding: 8px 12px; }
  #screen-sales-order-mgmt .sales-order-waybill-progress-editor { padding: 10px 12px; }

  #screen-sales-order-mgmt .sales-order-print-jobs { margin-top: 10px; border: 1px solid #d8dfe5; border-radius: 5px; background: #fff; }
  #screen-sales-order-mgmt .sales-order-print-jobs > summary { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 7px 12px; color: #344054; list-style: none; cursor: pointer; }
  #screen-sales-order-mgmt .sales-order-print-jobs > summary::-webkit-details-marker { display: none; }
  #screen-sales-order-mgmt .sales-order-print-jobs > summary::after { color: #687481; content: "\25BE"; transition: transform .15s ease; }
  #screen-sales-order-mgmt .sales-order-print-jobs[open] > summary { border-bottom: 1px solid #dfe5ea; background: #f7f9fa; }
  #screen-sales-order-mgmt .sales-order-print-jobs[open] > summary::after { transform: rotate(180deg); }
  #screen-sales-order-mgmt .sales-order-print-jobs > summary > strong { font-size: 14px; }
  #screen-sales-order-mgmt .sales-order-print-jobs-content { padding: 0 10px 10px; }
  #screen-sales-order-mgmt .sales-order-print-jobs-actions { display: flex; justify-content: flex-end; padding: 8px 0; }
  #screen-sales-order-mgmt .sales-order-print-jobs-actions button { min-height: 36px; border: 1px solid #7f8d99; border-radius: 5px; padding: 6px 10px; background: #fff; color: #344054; font-size: 13px; font-weight: 800; cursor: pointer; }
  #screen-sales-order-mgmt .sales-order-print-job:first-of-type { border-top: 0; }
}

@media screen and (min-width: 1200px) {
  #screen-sales-order-mgmt .sales-order-mgmt-body,
  #screen-sales-order-mgmt .sales-order-workspace { grid-template-columns: 312px minmax(0, 1fr); }
  #screen-sales-order-mgmt .sales-order-auto-print,
  #screen-sales-order-mgmt .sales-order-dashboard { min-height: 50px; }
  #screen-sales-order-mgmt .sales-order-auto-print { grid-template-columns: minmax(0, 1fr) auto; padding: 5px 10px; }
  #screen-sales-order-mgmt .sales-order-auto-print-scope { display: none; }
  #screen-sales-order-mgmt .sales-order-dashboard { padding: 4px 12px; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric { min-height: 40px; }
  #screen-sales-order-mgmt .sales-order-detail-head { padding-top: 7px; padding-bottom: 7px; }
  #screen-sales-order-mgmt .sales-order-detail-panel { padding-top: 10px; }
}

@media screen and (max-width: 820px) {
  #screen-sales-order-mgmt .sales-order-auto-print { min-height: 56px; }
  #screen-sales-order-mgmt .sales-order-dashboard { gap: 8px; }
  #screen-sales-order-mgmt .sales-order-dashboard-metrics { display: flex; overflow-x: auto; border-radius: 5px; padding-bottom: 0; scroll-snap-type: x proximity; }
  #screen-sales-order-mgmt .sales-order-dashboard-metric { flex: 0 0 118px; min-width: 118px; scroll-snap-align: start; }
  #screen-sales-order-mgmt .sales-order-detail-navigation { align-items: stretch; flex-direction: column; gap: 0; }
  #screen-sales-order-mgmt .sales-order-detail-navigation .sales-order-detail-nav { order: 1; width: 100%; }
  #screen-sales-order-mgmt .sales-order-detail-navigation .sales-order-workspace-switch { order: 2; width: 100%; min-height: 46px; border-top: 1px solid #e0e5e9; }
  #screen-sales-order-mgmt .sales-order-waybill-progress-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  #screen-sales-order-mgmt .sales-order-waybill-progress-grid,
  #screen-sales-order-mgmt .sales-order-waybill-progress-grid.outbound-only { grid-template-columns: minmax(0, 1fr); }
  #screen-sales-order-mgmt .sales-order-print-job { grid-template-columns: minmax(0, 1fr) auto; }
  #screen-sales-order-mgmt .sales-order-print-job > time { grid-column: 1 / -1; }
}

/* Setup belongs to the menu Settings section; daily integration stays compact. */
.dcats-business-workspace-daily-actions { grid-template-columns: minmax(0, 1fr); }
.dcats-business-workspace-settings-link { margin: 20px; padding-top: 16px; border-top: 1px solid #d8dfdb; }
.dcats-business-workspace-settings-link p, .dcats-business-workspace-settings-description { color: #58685f; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.dcats-business-workspace-settings-description { margin: 16px 20px; }
.dcats-business-workspace-settings-link button { min-height: 44px; padding: 10px 14px; border: 1px solid #287356; border-radius: 5px; background: #fff; color: #176b43; cursor: pointer; }
.dcats-business-workspace-settings-link button:focus-visible, .dcats-business-workspace-actions a:focus-visible { outline: 2px solid #287356; outline-offset: 3px; }
.dcats-business-workspace-settings-group { margin: 20px; border: 1px solid #cbd8d1; border-radius: 6px; padding: 16px; }
.dcats-business-workspace-settings-group h4 { margin: 0 0 12px; color: #1d2c25; font-size: 14px; }
.dcats-business-workspace-settings-group .dcats-business-workspace-actions { padding: 0 0 12px; }
.dcats-business-workspace-settings-group .dcats-business-workspace-shortcut-hint { margin: 0; }
.dcats-business-workspace-settings-card .dcats-business-workspace-backup { margin: 20px; }

#dcats-business-workspace-backup-next ul { margin: 12px 0 0; padding-left: 20px; }
#dcats-business-workspace-backup-next li { margin: 0 0 12px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
#dcats-business-workspace-backup-next li p { margin: 3px 0 0; }

.dcats-workspace-support{margin:16px 0;padding:16px;border:1px solid #d6c8a7;border-left:4px solid #947336;border-radius:8px;background:#fffaf0;color:#263a43;overflow-wrap:anywhere;}
.dcats-workspace-support[hidden],.dcats-workspace-support [hidden]{display:none!important;}
.dcats-workspace-support h4{margin:0 0 10px;font-size:15px;}
.dcats-workspace-support p{margin:8px 0;line-height:1.7;}
.dcats-workspace-support-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;}
.dcats-workspace-support button,.dcats-workspace-support a{max-width:100%;white-space:normal;line-height:1.5;}
.dcats-workspace-support button{padding:9px 12px;border:1px solid #347960;border-radius:5px;background:#fff;color:#245e4a;cursor:pointer;}
.dcats-workspace-support button:disabled{opacity:.65;cursor:wait;}
.dcats-workspace-support a{display:inline-block;margin:5px 10px 5px 0;color:#225d7e;text-decoration:underline;}
.dcats-workspace-support-note{font-size:12px;color:#536674;}
.dcats-workspace-support[data-phase="ready"]{background:#f1f8f3;border-color:#8fb59e;}

/* Customer management: purpose-based workspace, with one persistent save action. */
#screen-customer-access-mgmt.active { height:100dvh; min-height:0; overflow:hidden; color:var(--dcats-ink); }
#screen-customer-access-mgmt .customer-access-body { display:flex; flex-direction:column; flex:1; min-height:0; width:100%; max-width:1600px; padding:24px; gap:20px; overflow:hidden; }
.customer-workspace-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.customer-workspace-heading h1 { font-size:26px; line-height:1.4; letter-spacing:.02em; margin:0 0 5px; }
.customer-workspace-heading p { font-size:13px; line-height:1.7; color:#526175; }
#screen-customer-access-mgmt .customer-access-layout { display:grid; grid-template-columns:300px minmax(0,1fr); gap:24px; align-items:stretch; flex:1; min-height:0; }
#screen-customer-access-mgmt .customer-access-panel { min-width:0; min-height:0; border:1px solid #dce3eb; border-radius:12px; background:#fff; overflow:hidden; }
#screen-customer-access-mgmt .customer-directory { display:flex; flex-direction:column; }
#screen-customer-access-mgmt .customer-access-panel-head { min-height:60px; padding:16px; gap:8px; display:flex; align-items:center; border-bottom:0; }
.customer-directory h2 { font-size:15px; margin:0; flex:1; }
.customer-directory .mgmt-count { margin:0; font-size:12px; color:#526175; }
#screen-customer-access-mgmt .customer-directory .btn-sm-edit { height:32px; font-size:12px; padding:0 10px; }
.customer-directory-search { padding:0 16px 16px; display:grid; gap:10px; border-bottom:1px solid #edf0f4; }
.customer-directory-search > label:first-child { font-size:12px; color:#526175; font-weight:700; }
.customer-directory-search > div { display:flex; gap:6px; }
#screen-customer-access-mgmt .customer-directory-search .mgmt-search { width:100%; min-width:0; flex:1; height:40px; padding:0 10px; font-size:12px; }
.customer-directory-search .btn-primary { height:40px; padding:0 12px; font-size:12px; flex-shrink:0; }
.customer-directory-search .customer-access-filter-check { display:flex; align-items:center; gap:8px; min-height:28px; color:#526175; font-size:12px; }
.customer-directory-search input[type=checkbox] { width:16px; height:16px; accent-color:var(--dcats-brand-red); }
#screen-customer-access-mgmt .customer-access-list { overflow:auto; flex:1; min-height:0; padding:8px; max-height:none; }
#screen-customer-access-mgmt .customer-access-row { min-height:76px; padding:14px 12px; border:1px solid transparent; border-radius:8px; border-left:3px solid transparent; margin:2px 0; width:100%; text-align:left; }
#screen-customer-access-mgmt .customer-access-row:hover { background:var(--dcats-surface); }
#screen-customer-access-mgmt .customer-access-row.selected { background:var(--dcats-brand-red-soft); border-left-color:var(--dcats-brand-red); }
#screen-customer-access-mgmt .customer-access-name { font-size:14px; line-height:1.6; font-weight:700; overflow-wrap:anywhere; }
#screen-customer-access-mgmt .customer-access-sub { font-size:12px; color:#526175; margin-top:4px; line-height:1.5; overflow-wrap:anywhere; }
#screen-customer-access-mgmt .customer-workspace { display:flex; flex-direction:column; }
.customer-workspace-header { flex:0 0 auto; display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:22px 24px 18px; }
.customer-workspace-identity { min-width:0; }
.customer-workspace-identity p { display:flex; flex-wrap:wrap; align-items:center; gap:10px; color:#526175; font-size:12px; margin:0 0 7px; line-height:1.6; }
.customer-workspace-header h2 { font-size:24px; line-height:1.5; margin:0; overflow-wrap:anywhere; }
.customer-workspace-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; flex-shrink:0; max-width:40%; }
#screen-customer-access-mgmt .customer-workspace-actions button { min-height:36px; padding:8px 12px; border-radius:6px; font-size:12px; white-space:normal; }
.customer-workspace-tabs { flex:0 0 auto; display:flex; gap:24px; padding:0 24px; border-bottom:1px solid #dce3eb; }
.customer-workspace-tabs button { flex-shrink:0; min-height:48px; padding:8px 2px 12px; background:none; border:0; border-bottom:3px solid transparent; color:#526175; font-size:14px; font-weight:600; cursor:pointer; }
.customer-workspace-tabs button[aria-selected=true] { color:var(--dcats-ink); border-bottom-color:var(--dcats-brand-red); font-weight:800; }
.customer-workspace-tabs button:disabled { cursor:default; opacity:.45; }
.customer-workspace-content { flex:1; min-height:0; overflow:auto; padding:24px; overscroll-behavior:contain; }
#screen-customer-access-mgmt .customer-access-detail { padding:0; }
#screen-customer-access-mgmt [data-customer-access-panel][hidden], #screen-customer-access-mgmt [data-customer-access-tab][hidden] { display:none!important; }
.customer-workspace-section-head { margin-bottom:20px; }
.customer-workspace-section-head h3 { font-size:18px; margin:0 0 6px; line-height:1.5; }
.customer-workspace-section-head p { font-size:13px; color:#526175; line-height:1.8; }
.customer-workspace-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 28px; }
.customer-workspace-card { display:flex; flex-direction:column; align-items:flex-start; gap:12px; text-align:left; border:1px solid #dce3eb; border-radius:8px; padding:18px; background:#fff; color:var(--dcats-ink); cursor:pointer; min-width:0; }
.customer-workspace-card:hover { border-color:#9caec4; background:var(--dcats-surface); }
.customer-workspace-card > span:first-child { font-size:13px; color:#526175; font-weight:600; }
.customer-workspace-card strong { font-size:16px; line-height:1.6; overflow-wrap:anywhere; }
.customer-workspace-card small { font-size:12px; color:#526175; line-height:1.8; }
.customer-workspace-card-link { color:#255db0; font-size:12px; font-weight:700; margin-top:auto; padding-top:8px; }
.customer-workspace-maintenance { border-top:1px solid #edf0f4; margin-top:24px; padding-top:18px; }
.customer-workspace-maintenance summary { color:#526175; font-size:13px; font-weight:600; cursor:pointer; min-height:32px; }
.customer-workspace-maintenance p { color:#526175; font-size:12px; line-height:1.8; margin:8px 0 16px; }
.customer-workspace-rank { display:grid; grid-template-columns:minmax(100px,180px) minmax(160px,320px); gap:8px 20px; align-items:center; padding:16px; border:1px solid #dce3eb; background:var(--dcats-surface); border-radius:8px; margin-bottom:24px; }
.customer-workspace-rank > span { font-size:14px; font-weight:700; }
#screen-customer-access-mgmt .customer-workspace-rank select { width:100%; height:42px; font-size:14px; }
.customer-workspace-rank small { grid-column:2; color:#526175; font-size:12px; line-height:1.6; }
#screen-customer-access-mgmt .component-section-title { font-size:15px; margin-top:24px; line-height:1.6; }
#screen-customer-access-mgmt .component-note, #screen-customer-access-mgmt .customer-default-shipping-grid + .component-note { color:#526175; font-size:12px; line-height:1.8; }
#screen-customer-access-mgmt .customer-check { min-height:48px; font-size:13px; align-items:center; gap:10px; padding:12px; }
#screen-customer-access-mgmt .customer-check input, #screen-customer-access-mgmt .customer-category-check input { width:17px; height:17px; accent-color:var(--dcats-brand-red); }
#screen-customer-access-mgmt .customer-check.disabled { color:#687589; }
#screen-customer-access-mgmt .customer-order-publication { padding:16px; }
#screen-customer-access-mgmt .customer-order-publication-copy strong { font-size:14px; }
#screen-customer-access-mgmt .customer-order-publication-copy small { font-size:12px; line-height:1.7; }
#screen-customer-access-mgmt .customer-category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
#screen-customer-access-mgmt .customer-category-check { min-height:50px; font-size:13px; line-height:1.6; }
#screen-customer-access-mgmt .customer-category-toolbar { padding:12px; }
#screen-customer-access-mgmt .customer-default-shipping-grid label span, #screen-customer-access-mgmt .customer-shipping-rule-option strong { font-size:14px; }
#screen-customer-access-mgmt .customer-default-shipping-grid select { height:44px; font-size:13px; }
#screen-customer-access-mgmt .customer-shipping-rule-option { min-height:82px; padding:16px; gap:10px; }
#screen-customer-access-mgmt .customer-shipping-rule-option small { color:#526175; font-size:12px; line-height:1.7; }
#screen-customer-access-mgmt .customer-access-save-bar { position:static; flex:0 0 auto; border-top:1px solid #dce3eb; border-bottom:0; box-shadow:none; background:var(--dcats-surface); padding:16px 24px; }
#screen-customer-access-mgmt .customer-access-save-copy strong { font-size:13px; }
#screen-customer-access-mgmt .customer-access-save-copy span { font-size:12px; color:#526175; line-height:1.7; }
#screen-customer-access-mgmt .customer-access-save-btn { flex:0 0 auto; min-width:132px; min-height:42px; font-size:14px; padding:10px 18px; }
#screen-customer-access-mgmt .customer-access-save-bar.unsaved { background:var(--dcats-warning-bg); }
#screen-customer-access-mgmt .customer-workspace-empty { padding:48px 20px; text-align:center; color:#526175; font-size:14px; line-height:1.8; }
.customer-workspace-empty h3 { color:var(--dcats-ink); font-size:18px; margin:0 0 10px; }
.customer-workspace-empty p { font-size:13px; margin:0 auto 20px; max-width:420px; }
#screen-customer-access-mgmt .customer-account-issuance { margin:0; border:0; }
#screen-customer-access-mgmt .customer-account-issuance-head { padding:0 0 20px; background:#fff; border:0; }
#screen-customer-access-mgmt .customer-account-issuance-head h3 { font-size:18px; }
#screen-customer-access-mgmt .customer-account-issuance-head p { font-size:12px; line-height:1.8; }
#screen-customer-access-mgmt .customer-account-issuance-head > .permission-status { display:none; }
#screen-customer-access-mgmt .customer-account-existing { border:1px solid #dce3eb; border-radius:8px; overflow:hidden; }
#screen-customer-access-mgmt .customer-account-list .empty { padding:30px 16px; font-size:13px; color:#526175; }
#screen-customer-access-mgmt .customer-account-user-identity span { font-size:12px; overflow-wrap:anywhere; }
#screen-customer-access-mgmt .customer-account-user-row { padding:16px; }
.customer-workspace-invite { margin-top:24px; padding:16px; border:1px solid #dce3eb; border-radius:8px; }
.customer-workspace-invite > summary { cursor:pointer; font-size:14px; font-weight:700; color:var(--dcats-ink); min-height:28px; }
#screen-customer-access-mgmt .customer-account-issuance-fields { grid-template-columns:repeat(2,minmax(0,1fr)); padding:20px 0; gap:16px; }
#screen-customer-access-mgmt .customer-account-issuance-fields .user-field-label { font-size:13px; }
#screen-customer-access-mgmt .customer-account-issuance-fields input { height:42px; font-size:14px; }
#screen-customer-access-mgmt .customer-account-issuance-fields .user-field-note { font-size:12px; line-height:1.6; }
#screen-customer-access-mgmt .customer-account-issuance-actions { padding:0; flex-wrap:wrap; }
#screen-customer-access-mgmt .customer-account-customer-field { grid-column:1 / -1; }
.customer-directory-back { display:none; }
#screen-customer-access-mgmt button:focus-visible, #screen-customer-access-mgmt input:focus-visible, #screen-customer-access-mgmt select:focus-visible, #screen-customer-access-mgmt summary:focus-visible { outline:2px solid var(--dcats-focus); outline-offset:3px; }
@media(max-width:1100px) {
  #screen-customer-access-mgmt .customer-access-layout { grid-template-columns:260px minmax(0,1fr); gap:16px; }
  .customer-workspace-header { flex-direction:column; }
  .customer-workspace-actions { justify-content:flex-start; max-width:100%; }
  .customer-workspace-cards { grid-template-columns:1fr; }
  .customer-workspace-card { gap:6px; padding:14px; }
}
@media(max-width:760px) {
  #screen-customer-access-mgmt .customer-access-body { padding:12px; gap:12px; }
  .customer-workspace-heading { align-items:flex-start; gap:10px; }
  .customer-workspace-heading h1 { font-size:20px; }
  .customer-workspace-heading p { display:none; }
  .customer-workspace-heading .customer-access-add-btn { font-size:12px; min-height:38px; height:auto; padding:8px 12px; white-space:nowrap; }
  #screen-customer-access-mgmt .customer-access-layout { display:flex; flex-direction:column; gap:0; }
  #screen-customer-access-mgmt .customer-directory, #screen-customer-access-mgmt .customer-workspace { flex:1; }
  #screen-customer-access-mgmt[data-customer-view="directory"] .customer-workspace { display:none; }
  #screen-customer-access-mgmt[data-customer-view="detail"] .customer-directory { display:none; }
  .customer-directory-back { display:block; flex:0 0 auto; min-height:40px; width:max-content; margin:8px 16px 0; background:none; border:0; padding:6px 0; color:#255db0; font-weight:700; font-size:12px; cursor:pointer; }
  .customer-workspace-header { padding:12px 16px 14px; gap:12px; }
  .customer-workspace-header h2 { font-size:20px; }
  .customer-workspace-actions { gap:6px; }
  .customer-workspace-tabs { padding:0 12px; gap:0; justify-content:space-between; }
  .customer-workspace-tabs button { font-size:12px; padding:10px 6px; min-width:0; white-space:normal; }
  .customer-workspace-content { padding:18px 16px; }
  .customer-workspace-section-head h3 { font-size:16px; }
  #screen-customer-access-mgmt .customer-access-save-bar { padding:12px 16px; flex-direction:row; align-items:center; gap:10px; }
  #screen-customer-access-mgmt .customer-access-save-copy span { display:none; }
  #screen-customer-access-mgmt .customer-access-save-btn { min-width:110px; padding:9px 12px; font-size:13px; }
  .customer-workspace-rank { grid-template-columns:1fr; gap:8px; padding:14px; }
  .customer-workspace-rank small { grid-column:auto; }
  #screen-customer-access-mgmt .customer-setting-grid, #screen-customer-access-mgmt .customer-shipping-rule-options, #screen-customer-access-mgmt .customer-default-shipping-grid, #screen-customer-access-mgmt .customer-account-issuance-fields { grid-template-columns:1fr; }
  #screen-customer-access-mgmt .customer-category-grid { grid-template-columns:1fr 1fr; }
  #screen-customer-access-mgmt .customer-category-toolbar { gap:10px; }
  #screen-customer-access-mgmt .customer-category-check { font-size:12px; }
  #screen-customer-access-mgmt .customer-account-issuance-actions button { width:100%; min-height:40px; }
}

#screen-customer-access-mgmt .customer-access-row.selected { box-shadow:none; }
#screen-customer-access-mgmt .btn-sm-edit { border-color:var(--dcats-border); color:#34445a; background:#fff; }
#screen-customer-access-mgmt .btn-sm-edit:hover { background:var(--dcats-surface); border-color:#9caec4; }
#screen-customer-access-mgmt .customer-hanbaiou-billing { border:1px solid #dce3eb; background:var(--dcats-surface); padding:16px; }
#screen-customer-access-mgmt .customer-hanbaiou-billing-field span { font-size:13px; }
#screen-customer-access-mgmt .customer-hanbaiou-billing-field input, #screen-customer-access-mgmt .customer-hanbaiou-billing-field select { height:42px; font-size:14px; }
#screen-customer-access-mgmt .customer-hanbaiou-billing-help { font-size:12px; line-height:1.7; color:#526175; }
@media(max-width:760px) {
  #screen-customer-access-mgmt .customer-workspace-heading > div { min-width:0; }
  #screen-customer-access-mgmt #btn-customer-access-add { width:auto; flex:0 0 auto; min-width:0; }
  #screen-customer-access-mgmt #btn-customer-access-save { width:auto; flex:0 0 auto; }
}
/* Core management: shared typography, explicit filters and readable quantities. */
#screen-core-list-mgmt .core-workspace { max-width: 1600px; padding: 18px 28px 32px; margin: 0 auto; }
#screen-core-list-mgmt .core-workspace-heading { margin-bottom: 14px; }
#screen-core-list-mgmt .core-workspace-heading h1 { margin: 0 0 5px; color: #172b46; font-size: 24px; line-height: 1.45; }
#screen-core-list-mgmt .core-workspace-heading p, #screen-core-list-mgmt .core-workspace-section-heading p { margin: 0; color: #596579; font-size: 13px; line-height: 1.7; }
#screen-core-list-mgmt .core-list-mode-switch { display: flex; width: fit-content; max-width: 100%; margin-bottom: 16px; padding: 4px; gap: 4px; background: #e9edf3; border: 1px solid #d4dce6; border-radius: 10px; }
#screen-core-list-mgmt .core-list-mode-btn { min-width: 210px; padding: 8px 18px; text-align: left; font-size: 15px; border-radius: 7px; color: #526077; }
#screen-core-list-mgmt .core-list-mode-btn span { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; line-height: 1.5; }
#screen-core-list-mgmt .core-list-mode-btn.active { background: #fff; color: #173b6d; box-shadow: 0 1px 4px #243b531c; }
#screen-core-list-mgmt .core-workspace-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
#screen-core-list-mgmt .core-workspace-section-heading h2 { margin: 0 0 4px; color: #172b46; font-size: 18px; }
#screen-core-list-mgmt .core-workspace-scope { color: #667085; font-size: 12px; }
#screen-core-list-mgmt .mgmt-toolbar { display: block; margin-bottom: 14px; padding: 0; background: transparent; border: 0; }
#screen-core-list-mgmt .core-workspace-filters { display: grid; grid-template-columns: minmax(220px, 2fr) auto minmax(460px, 3fr); align-items: end; gap: 10px; padding: 16px; background: #fff; border: 1px solid var(--dcats-border); border-radius: 8px; }
#screen-core-list-mgmt .core-workspace-filters label { display: grid; min-width: 0; gap: 6px; margin: 0; }
#screen-core-list-mgmt .core-workspace-filters label > span { font-size: 12px; font-weight: 700; color: #49576d; }
#screen-core-list-mgmt .mgmt-search, #screen-core-list-mgmt .form-select { min-width: 0; width: 100%; height: 40px; margin: 0; padding: 8px 10px; font: inherit; font-size: 13px; border: 1px solid #bdc8d6; border-radius: 6px; box-sizing: border-box; background-color: #fff; }
#screen-core-list-mgmt button { font-family: inherit; }
#screen-core-list-mgmt .core-workspace-filters button { min-height: 40px; padding: 8px 14px; white-space: normal; }
#screen-core-list-mgmt .core-workspace-clear { color: #526077; border-color: #bdc8d6; background: #fff; }
#screen-core-list-mgmt .core-workspace-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 14px; }
#screen-core-list-mgmt .core-workspace-create { display: flex; flex-wrap: wrap; gap: 8px; }
#screen-core-list-mgmt .core-workspace-actions button { min-height: 40px; padding: 8px 14px; font-size: 13px; }
#screen-core-list-mgmt .core-workspace-inventory-filters { grid-template-columns: minmax(220px, 600px) auto; justify-content: start; }
#screen-core-list-mgmt .core-workspace-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; color: #172b46; }
#screen-core-list-mgmt .core-workspace-summary:empty { display: none; }
#screen-core-list-mgmt .core-summary-item { padding: 11px 18px; border: 1px solid #d5dde7; border-radius: 8px; background: #fff; }
#screen-core-list-mgmt .core-summary-item > span { font-size: 12px; font-weight: 600; color: #596579; }
#screen-core-list-mgmt .core-summary-item strong { display: block; margin-top: 4px; font-size: 28px; line-height: 1.35; font-weight: 750; font-variant-numeric: tabular-nums; }
#screen-core-list-mgmt .core-summary-item small { margin-left: 7px; font-size: 12px; font-weight: 400; color: #596579; }
#screen-core-list-mgmt .core-summary-item.stock { background: #f3f9f6; border-color: #c9e0d3; }
#screen-core-list-mgmt .core-summary-item.stock strong { color: #21633e; }
#screen-core-list-mgmt .core-summary-item.shortage { background: #fff4f1; border-color: #efc7bd; }
#screen-core-list-mgmt .core-summary-item.shortage strong { color: #a13725; }
#screen-core-list-mgmt .core-summary-note { grid-column: 1 / -1; margin: -3px 0 0; color: #667085; font-size: 12px; font-weight: 400; line-height: 1.6; }
#screen-core-list-mgmt .core-workspace-results { border: 1px solid #d5dde7; border-radius: 8px; background: #fff; overflow: hidden; }
#screen-core-list-mgmt .core-workspace-results-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-bottom: 1px solid #dce3eb; }
#screen-core-list-mgmt .core-workspace-results-heading h3 { margin: 0; font-size: 14px; color: #243b53; }
#screen-core-list-mgmt .core-workspace-results-heading > span { font-size: 12px; color: #667085; }
#screen-core-list-mgmt #core-list-list { overflow-x: auto; }
#screen-core-list-mgmt #core-list-list .mgmt-table { margin: 0; border-radius: 0; box-shadow: none; min-width: 1000px !important; }
#screen-core-list-mgmt #core-list-list .mgmt-table th { padding: 11px 12px; background: #f4f6f9; color: #526077; font-size: 12px; font-weight: 700; }
#screen-core-list-mgmt #core-list-list .mgmt-table td { padding: 13px 12px; vertical-align: middle; font-size: 13px; border-bottom: 1px solid #e7ecf1; white-space: normal; overflow-wrap: anywhere; }
#screen-core-list-mgmt #core-list-list .mgmt-table tr:last-child td { border-bottom: 0; }
#screen-core-list-mgmt #core-list-list .core-main-pn { font-family: inherit; font-size: 16px; font-weight: 750; line-height: 1.5; color: #173b6d; }
#screen-core-list-mgmt #core-list-list .mgmt-pn { font-family: inherit; white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
#screen-core-list-mgmt #core-list-list .mgmt-sub { margin-top: 4px; color: #667085; font-size: 12px; line-height: 1.55; }
#screen-core-list-mgmt #core-list-list .core-collection-table th:nth-child(1), #screen-core-list-mgmt #core-list-list .core-collection-table td:nth-child(1) { width: 100px; }
#screen-core-list-mgmt #core-list-list .core-collection-table th:nth-child(2), #screen-core-list-mgmt #core-list-list .core-collection-table td:nth-child(2) { width: 190px; }
#screen-core-list-mgmt #core-list-list .core-collection-table th:nth-child(3), #screen-core-list-mgmt #core-list-list .core-collection-table td:nth-child(3) { width: 105px; }
#screen-core-list-mgmt #core-list-list .core-collection-table th:nth-child(4), #screen-core-list-mgmt #core-list-list .core-collection-table td:nth-child(4) { width: 125px; }
#screen-core-list-mgmt #core-list-list .core-collection-table th:nth-child(5), #screen-core-list-mgmt #core-list-list .core-collection-table td:nth-child(5), #screen-core-list-mgmt #core-list-list .core-collection-table th:nth-child(6), #screen-core-list-mgmt #core-list-list .core-collection-table td:nth-child(6) { width: 60px; text-align: center; }
#screen-core-list-mgmt #core-list-list .core-collection-table th:nth-child(7), #screen-core-list-mgmt #core-list-list .core-collection-table td:nth-child(7) { width: auto; text-align: left; }
#screen-core-list-mgmt #core-list-list .core-collection-table th:nth-child(8), #screen-core-list-mgmt #core-list-list .core-collection-table td:nth-child(8) { width: 165px; }
#screen-core-list-mgmt .core-category-rank { margin-bottom: 6px; }
#screen-core-list-mgmt .core-category-rank strong { font-size: 17px; }
#screen-core-list-mgmt .core-collection-rank-badge { font-size: 12px; }
#screen-core-list-mgmt .core-qty-pill, #screen-core-list-mgmt .core-shortage-value { min-width: 34px; padding: 4px 7px; font-size: 18px; font-variant-numeric: tabular-nums; }
#screen-core-list-mgmt .core-row-details { margin-top: 7px; color: #596579; font-size: 12px; line-height: 1.6; }
#screen-core-list-mgmt .core-row-details summary { cursor: pointer; padding: 5px 0; }
#screen-core-list-mgmt .mgmt-actions { gap: 6px; }
#screen-core-list-mgmt .mgmt-actions button { min-height: 34px; padding: 6px 9px; }
#screen-core-list-mgmt .btn-sm-del { background: #fff; color: #a33731; border: 1px solid #dec6c5; }
#screen-core-list-mgmt :is(button, input, select, summary):focus-visible { outline: 2px solid var(--dcats-focus); outline-offset: 3px; }
#screen-core-list-mgmt .loading, #screen-core-list-mgmt .empty { padding: 40px 20px; line-height: 1.8; color: #596579; }
@media (max-width: 1100px) {
  #screen-core-list-mgmt .core-workspace { padding: 20px 18px 32px; }
  #screen-core-list-mgmt .core-workspace-filters { grid-template-columns: minmax(0, 1fr) auto; }

  #screen-core-list-mgmt .core-workspace-inventory-filters { grid-template-columns: minmax(0, 1fr) auto; }
  #screen-core-list-mgmt .core-workspace-inventory-filters .core-workspace-search { grid-column: auto; }
}
@media (max-width: 767px) {
  #screen-core-list-mgmt .core-workspace { padding: 16px 12px 28px; }
  #screen-core-list-mgmt .core-workspace-heading { margin-bottom: 14px; }
  #screen-core-list-mgmt .core-workspace-heading h1 { font-size: 21px; }
  #screen-core-list-mgmt .core-list-mode-switch { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-bottom: 20px; }
  #screen-core-list-mgmt .core-list-mode-btn { width: 100%; min-width: 0; padding: 9px 10px; font-size: 14px; }
  #screen-core-list-mgmt .core-list-mode-btn span { font-size: 12px; }
  #screen-core-list-mgmt .core-workspace-section-heading { display: block; }
  #screen-core-list-mgmt .core-workspace-scope { display: none; }
  #screen-core-list-mgmt .core-workspace-filters { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; gap: 10px; }
  #screen-core-list-mgmt .core-workspace-search { grid-column: auto; }
  #screen-core-list-mgmt .mgmt-search { grid-column: auto; }
  #screen-core-list-mgmt .core-workspace-filters button { min-height: 42px; width: 100%; }
  #screen-core-list-mgmt .core-workspace-clear { grid-column: 1 / -1; }
  #screen-core-list-mgmt .core-workspace-actions { align-items: stretch; }
  #screen-core-list-mgmt .core-workspace-create { display: grid; grid-template-columns: 1fr; flex: 1; }
  #screen-core-list-mgmt .core-workspace-actions > #btn-export-core-collection { align-self: flex-start; }
  #screen-core-list-mgmt .core-workspace-inventory-filters { grid-template-columns: minmax(0, 1fr) auto; }
  #screen-core-list-mgmt .core-workspace-inventory-filters .core-workspace-search { grid-column: auto; }
  #screen-core-list-mgmt .core-workspace-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  #screen-core-list-mgmt .core-summary-item { padding: 11px 14px; }
  #screen-core-list-mgmt .core-summary-item strong { font-size: 25px; }
  #screen-core-list-mgmt .core-workspace-results { background: transparent; border: 0; overflow: visible; }
  #screen-core-list-mgmt .core-workspace-results-heading { padding: 8px 0 12px; border: 0; }
  #screen-core-list-mgmt .core-list-mobile-cards { display: grid; gap: 10px; }
  #screen-core-list-mgmt .core-collection-card, #screen-core-list-mgmt .core-list-card { padding: 15px; border-color: #d5dde7; box-shadow: none; border-radius: 8px; }
  #screen-core-list-mgmt .core-collection-card-head { gap: 6px; }
  #screen-core-list-mgmt .core-collection-card-head > div { min-width: 0; }
  #screen-core-list-mgmt .core-collection-card-head > .core-collection-rank-badge { flex-shrink: 0; }
  #screen-core-list-mgmt .core-collection-qty-grid { margin: 4px 0 10px; }
  #screen-core-list-mgmt .core-collection-qty-grid > div { padding: 10px 4px; }
  #screen-core-list-mgmt .core-collection-qty-grid > div > span:not(.core-stock-badge) { font-size: 12px; }
  #screen-core-list-mgmt .core-collection-qty-grid strong { font-size: 22px; }
  #screen-core-list-mgmt .core-list-card-actions button { min-height: 40px; }
  #screen-core-list-mgmt .core-row-details { margin: 0 0 8px; }
}

#screen-core-list-mgmt .core-workspace-filter-options { display: block; min-width: 0; }
#screen-core-list-mgmt .core-workspace-filter-options > summary { display: none; }
#screen-core-list-mgmt .core-workspace-filter-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 10px; }
#screen-core-list-mgmt #core-list-list .core-collection-table th:nth-child(1), #screen-core-list-mgmt #core-list-list .core-collection-table td:nth-child(1) { width: 110px; }
#screen-core-list-mgmt #core-list-list .core-collection-table th:nth-child(3), #screen-core-list-mgmt #core-list-list .core-collection-table td:nth-child(3) { width: 115px; }
@media (min-width: 1101px) {
  #screen-core-list-mgmt .core-workspace { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: start; }
  #screen-core-list-mgmt #core-management-panel { grid-column: 1 / -1; }
  #screen-core-list-mgmt .core-list-mode-switch { margin-bottom: 18px; }
}
@media (max-width: 1100px) {
  #screen-core-list-mgmt .core-workspace-filter-options { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  #screen-core-list-mgmt .core-workspace-heading p, #screen-core-list-mgmt .core-workspace-section-heading p { display: none; }
  #screen-core-list-mgmt .core-workspace-section-heading h2 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  #screen-core-list-mgmt .core-workspace-filter-options { border-top: 1px solid #e1e6ec; }
  #screen-core-list-mgmt .core-workspace-filter-options > summary { display: list-item; min-height: 40px; padding: 12px 0 4px; font-size: 13px; font-weight: 600; color: #49576d; cursor: pointer; }
  #screen-core-list-mgmt .core-workspace-filter-fields { grid-template-columns: 1fr 1fr; padding-top: 10px; }
  #screen-core-list-mgmt .core-workspace-actions { display: grid; grid-template-columns: 1fr auto; }
  #screen-core-list-mgmt .core-workspace-create { display: contents; }
  #screen-core-list-mgmt .core-list-collection-toolbar .core-workspace-actions #btn-add-core-collection { grid-column: 1; grid-row: 1; width: 100%; }
  #screen-core-list-mgmt .core-list-collection-toolbar .core-workspace-actions #btn-export-core-collection { grid-column: 2; grid-row: 1; width: auto; }
  #screen-core-list-mgmt .core-list-collection-toolbar .core-workspace-actions #btn-create-core-list-from-ranking { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  #screen-core-list-mgmt .core-workspace-inventory-toolbar .core-workspace-actions { display: flex; }
}

/* Paused product 3D stays absent even before scripts run or after a stale UI insertion. */
html[data-product-3d-paused] :is(
  [data-product-media="model"],
  [data-product-media-pane="model"],
  [data-product-3d-media-shell][data-no-photos="true"],
  [data-product-3d-control],
  .product-3d-action-heading,
  .product-3d-has-badge,
  .product-3d-capture-overlay,
  .product-3d-viewer-overlay,
  .product-3d-tripo-overlay,
  [data-create-3d],
  [data-upload-3d],
  [data-local-glb],
  [data-open-model],
  [data-publish-model],
  [data-tripo-3d],
  [data-tripo-readiness],
  [data-hunyuan-readiness]
) { display: none !important; }

/* Dedicated factoring price conditions retain readable labels on narrow screens. */
.factoring-dialog { box-sizing: border-box; width: min(920px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #d7e1ed; border-radius: 12px; color: #1e2336; background: #fff; overflow: auto; }
.factoring-dialog::backdrop { background: rgba(20,26,40,.45); }
.factoring-dialog-head { padding: 20px 20px 0; }
.factoring-dialog-head h2 { margin: 0; font-size: 18px; }
.factoring-dialog-footer { position: sticky; bottom: 0; padding: 14px 20px; display: flex; justify-content: flex-end; border-top: 1px solid #d7e1ed; background: #fff; }
.factoring-pricing-panel { padding: 20px; background: #fff; }
.factoring-pricing-panel[hidden] { display: none; }
#factoring-open[hidden] { display: none; }
.factoring-pricing-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 14px 0; }
.factoring-pricing-fields label { display: grid; gap: 6px; font-size: 12px; min-width: 0; }
.factoring-pricing-panel p { line-height: 1.65; font-size: 12px; margin: 10px 0; }
.factoring-pricing-help { color: #59697c; }
.factoring-pricing-breakdown { display: block; font-weight: 700; line-height: 1.7; }
.factoring-pricing-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media(max-width:560px) { .factoring-pricing-fields { grid-template-columns: 1fr; } .factoring-pricing-panel { padding: 16px; } .factoring-dialog-head { padding: 16px 16px 0; } .factoring-dialog-footer { padding: 12px 16px; } }

.packing-box-overlay { position: fixed; inset: 0; z-index: 6000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgb(0 0 0 / 45%); }
.packing-box-overlay[hidden] { display: none; }
.packing-box-dialog { width: min(960px, 100%); max-height: 94vh; overflow: auto; padding: 20px; border-radius: 8px; background: #fff; color: #18304a; }
.packing-box-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.packing-box-dialog h2 { margin: 0; }
.packing-box-dialog p { line-height: 1.6; }
.packing-box-dialog button { min-height: 36px; padding: 6px 12px; border: 1px solid #96a8b8; border-radius: 4px; color: #18304a; background: #fff; cursor: pointer; }
.packing-box-dialog button:disabled { opacity: .55; cursor: wait; }
.packing-box-table { overflow-x: auto; }
.packing-box-table table { width: 100%; min-width: 610px; border-collapse: collapse; font-size: 14px; }
.packing-box-table th, .packing-box-table td { padding: 10px 8px; border-bottom: 1px solid #d4dde5; text-align: left; overflow-wrap: anywhere; }
.packing-box-tools { display: flex; gap: 8px; margin: 16px 0; }
.packing-box-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border-top: 1px solid #d4dde5; padding-top: 16px; }
.packing-box-form label { display: grid; gap: 6px; min-width: 0; font-size: 14px; }
.packing-box-form input:not([type=checkbox]) { width: 100%; min-height: 38px; border: 1px solid #96a8b8; border-radius: 4px; padding: 7px; font: inherit; }
.packing-box-form .packing-box-active { display: flex; align-items: center; gap: 8px; }
.packing-box-form button[type=submit] { background: #287255; color: #fff; border-color: #287255; }
.packing-box-message { margin: 10px 0; color: #216449; overflow-wrap: anywhere; }
.packing-box-message.error { color: #b4203a; }
@media(max-width: 600px) { .packing-box-overlay { padding: 8px; } .packing-box-dialog { padding: 14px; } .packing-box-form { grid-template-columns: 1fr; } }

.sales-product-warranty { margin-top: 9px; color: #344054; font-size: 13px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.finished-warranty-policy-inputs { display: grid; gap: 8px; min-width: 0; }
.finished-warranty-policy-table .finished-warranty-policy-inputs label { display: grid; gap: 3px; white-space: normal; }
.finished-warranty-policy-inputs label > span { font-size: 12px; color: #667085; }
.finished-warranty-policy-table .finished-warranty-policy-inputs input { width: 100%; min-width: 0; box-sizing: border-box; }

/* Spacious category warranty settings: independent of the shared form width. */
#finished-warranty-policy-overlay { padding: 24px; }
.form-card.finished-warranty-policy-card {
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  max-width: 1180px;
  height: min(920px, calc(100vh - 48px));
  height: min(920px, calc(100dvh - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.finished-warranty-policy-card .finished-warranty-policy-heading { flex: 0 0 auto; gap: 20px; padding: 22px 24px 18px; background: #f7fafe; }
.finished-warranty-policy-card .finished-warranty-policy-heading > div > span { font-size: 12px; }
.finished-warranty-policy-card .finished-warranty-policy-heading h3 { margin: 5px 0 0; font-size: 24px; line-height: 1.35; }
.finished-warranty-policy-card .finished-warranty-policy-heading p { max-width: 86ch; margin: 9px 0 0; color: #526174; font-size: 14px; line-height: 1.65; }
.finished-warranty-policy-card .finished-warranty-policy-heading button { flex-basis: 44px; width: 44px; height: 44px; border-radius: 8px; }
.finished-warranty-policy-card .finished-warranty-policy-table-wrap { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; padding: 0 24px; }
.finished-warranty-policy-card .finished-warranty-policy-table { width: 100%; table-layout: fixed; }
.finished-warranty-policy-card .finished-warranty-policy-table thead th { padding: 14px 12px; border-bottom: 1px solid #d4deeb; background: #eaf0f8; color: #344054; font-size: 15px; font-weight: 800; }
.finished-warranty-policy-card .finished-warranty-policy-table thead th:first-child { width: 22%; }
.finished-warranty-policy-card .finished-warranty-policy-table tbody th,
.finished-warranty-policy-card .finished-warranty-policy-table tbody td { padding: 14px 12px; vertical-align: middle; }
.finished-warranty-policy-card .finished-warranty-policy-table tbody th strong { color: #1b2d46; font-size: 16px; line-height: 1.5; }
.finished-warranty-policy-card .finished-warranty-policy-table tbody tr:hover { background: #f7faff; }
.finished-warranty-policy-card .finished-warranty-policy-inputs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 12px; }
.finished-warranty-policy-card .finished-warranty-policy-inputs label { gap: 6px; min-width: 0; }
.finished-warranty-policy-card .finished-warranty-policy-inputs label > span { color: #526174; font-size: 14px; line-height: 1.5; }
.finished-warranty-policy-card .finished-warranty-policy-inputs input { height: 46px; min-height: 46px; padding: 8px 12px; border-color: #b9c9db; border-radius: 7px; background: #fff; color: #172033; font-size: 18px; font-variant-numeric: tabular-nums; }
.finished-warranty-policy-card .finished-warranty-policy-inputs input:focus-visible { outline: 2px solid #3979d3; outline-offset: 2px; }
.finished-warranty-policy-kind { display: none; }
.finished-warranty-policy-card > .finished-shipment-message { flex: 0 0 auto; margin: 10px 24px 0; font-size: 14px; }
.finished-warranty-policy-card .finished-warranty-policy-footer { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; margin-top: 0; padding: 16px 24px; border-top: 1px solid #dce4ec; background: #fff; }
.finished-warranty-policy-card .finished-warranty-policy-note { margin: 0; color: #526174; font-size: 13px; line-height: 1.6; text-align: left; }
.finished-warranty-policy-card .finished-warranty-policy-footer button { min-height: 46px; margin: 0; padding: 10px 22px; font-size: 15px; white-space: nowrap; }
@media (max-width: 679px) {
  #finished-warranty-policy-overlay { padding: 8px; }
  .form-card.finished-warranty-policy-card { width: 100%; max-width: none; height: calc(100vh - 16px); height: calc(100dvh - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .finished-warranty-policy-card .finished-warranty-policy-heading { gap: 10px; padding: 16px; }
  .finished-warranty-policy-card .finished-warranty-policy-heading h3 { font-size: 20px; }
  .finished-warranty-policy-card .finished-warranty-policy-heading p { font-size: 13px; }
  .finished-warranty-policy-card .finished-warranty-policy-heading button { flex-basis: 40px; width: 40px; height: 40px; }
  .finished-warranty-policy-card .finished-warranty-policy-table-wrap { padding: 0 12px; background: #f5f8fc; }
  .finished-warranty-policy-card .finished-warranty-policy-table,
  .finished-warranty-policy-card .finished-warranty-policy-table tbody { display: block; }
  .finished-warranty-policy-card .finished-warranty-policy-table thead { display: none; }
  .finished-warranty-policy-card .finished-warranty-policy-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 12px 0; padding: 14px; border: 1px solid #d9e3ef; border-radius: 9px; background: #fff; }
  .finished-warranty-policy-card .finished-warranty-policy-table tbody th { grid-column: 1 / -1; }
  .finished-warranty-policy-card .finished-warranty-policy-table tbody th,
  .finished-warranty-policy-card .finished-warranty-policy-table tbody td { min-width: 0; padding: 0; border: 0; }
  .finished-warranty-policy-card .finished-warranty-policy-table tbody th strong { font-size: 16px; }
  .finished-warranty-policy-kind { display: block; margin-bottom: 8px; color: #244d7c; font-size: 14px; font-weight: 800; }
  .finished-warranty-policy-card .finished-warranty-policy-inputs { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .finished-warranty-policy-card .finished-warranty-policy-inputs label > span { font-size: 13px; }
  .finished-warranty-policy-card .finished-warranty-policy-inputs input { padding-right: 8px; padding-left: 8px; font-size: 17px; }
  .finished-warranty-policy-card > .finished-shipment-message { margin-right: 16px; margin-left: 16px; }
  .finished-warranty-policy-card .finished-warranty-policy-footer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 12px 16px; }
  .finished-warranty-policy-card .finished-warranty-policy-note { grid-column: 1 / -1; font-size: 12px; }
  .finished-warranty-policy-card .finished-warranty-policy-footer button { width: 100%; min-width: 0; padding-right: 10px; padding-left: 10px; font-size: 14px; }
}

.finished-warranty-policy-card .finished-warranty-policy-table td[colspan] { padding: 24px 12px; color: #526174; font-size: 14px; text-align: center; }
@media (max-width: 679px) { .finished-warranty-policy-card .finished-warranty-policy-table td[colspan] { grid-column: 1 / -1; } }

/* Warranty kinds use the same palette as Sales Management. */
.finished-warranty-policy-card .finished-warranty-policy-kind-heading.rebuilt,
.finished-warranty-policy-card .finished-warranty-policy-cell.rebuilt {
  --warranty-kind-bg: var(--kind-rebuilt-bg);
  --warranty-kind-fg: var(--kind-rebuilt-fg);
  --warranty-kind-border: var(--kind-rebuilt-border);
}
.finished-warranty-policy-card .finished-warranty-policy-kind-heading.aftermarket_new,
.finished-warranty-policy-card .finished-warranty-policy-cell.aftermarket_new {
  --warranty-kind-bg: var(--kind-aftermarket-bg);
  --warranty-kind-fg: var(--kind-aftermarket-fg);
  --warranty-kind-border: var(--kind-aftermarket-border);
}
.finished-warranty-policy-card .finished-warranty-policy-table thead th.finished-warranty-policy-kind-heading {
  background: var(--warranty-kind-bg);
  color: var(--warranty-kind-fg);
  border-bottom-color: var(--warranty-kind-border);
  box-shadow: inset 0 -3px 0 var(--warranty-kind-fg);
}
.finished-warranty-policy-card .finished-warranty-policy-table tbody td.finished-warranty-policy-cell {
  background: var(--warranty-kind-bg);
  border-bottom-color: var(--warranty-kind-border);
}
.finished-warranty-policy-card .finished-warranty-policy-cell .finished-warranty-policy-inputs label > span,
.finished-warranty-policy-card .finished-warranty-policy-cell .finished-warranty-policy-kind {
  color: var(--warranty-kind-fg);
}
.finished-warranty-policy-card .finished-warranty-policy-cell input {
  color: var(--warranty-kind-fg);
  border-color: var(--warranty-kind-border);
}
@media (max-width: 679px) {
  .finished-warranty-policy-card .finished-warranty-policy-table tbody td.finished-warranty-policy-cell {
    border-radius: 5px;
    box-shadow: 0 0 0 4px var(--warranty-kind-bg);
  }
}

/* Unified category names and warranty terms. */
.category-warranty-toolbar { display:flex; align-items:center; gap:12px; padding:14px 24px 8px; flex:0 0 auto; flex-wrap:wrap; }
.category-warranty-toolbar button { min-height:44px; padding:8px 16px; font:inherit; }
#category-warranty-count { color:#526174; font-size:14px; margin-right:auto; }
.category-warranty-help { margin:0; padding:0 24px 12px; color:#526174; font-size:13px; line-height:1.6; flex:0 0 auto; }
.finished-warranty-policy-card .finished-warranty-policy-table thead th:first-child { width:32%; }
.category-warranty-names { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; text-align:left; font-weight:400; }
.category-warranty-names > label { display:grid; gap:4px; min-width:0; }
.category-warranty-names > label:first-child { grid-column:1 / -1; }
.category-warranty-names label > span { font-size:12px; color:#526174; line-height:1.4; }
.finished-warranty-policy-table .category-warranty-names input { box-sizing:border-box; width:100%; min-width:0; min-height:40px; padding:8px 10px; border:1px solid #b9c9db; border-radius:7px; background:#fff; color:#172033; font-size:16px; font-family:inherit; }
.category-warranty-names input:focus-visible { outline:2px solid #3979d3; outline-offset:2px; }
.category-warranty-remove { margin-top:8px; padding:6px 8px; min-height:36px; border:1px solid #b9c9db; border-radius:6px; background:#fff; color:#a32635; cursor:pointer; font:inherit; font-size:13px; }
#finished-warranty-policy-overlay input:disabled { background:#f2f4f7; color:#526174; cursor:default; }




@media(max-width:679px) {
  .category-warranty-toolbar { gap:8px; padding:10px 16px 8px; }
  .category-warranty-toolbar button { padding:8px 10px; font-size:14px; }
  .category-warranty-help { padding:0 16px 10px; font-size:12px; }
  .finished-warranty-policy-card .finished-warranty-policy-table tbody td.category-warranty-kind { padding:10px; border-radius:7px; }
}

/* Required global category publication gate. */
.category-warranty-publish{display:flex;align-items:center;gap:8px;margin-top:6px;font-size:12px;color:var(--text-primary,#172b4d);font-weight:600}.finished-warranty-policy-card .finished-warranty-policy-table .category-warranty-publish input{box-sizing:border-box;width:18px;max-width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:0;padding:0;accent-color:var(--primary,#2563eb)}.customer-category-check.master-off{opacity:.65;background:var(--bg-secondary,#f4f6f8)}.customer-category-master-off{display:inline-block;font-size:12px;border:1px solid currentColor;border-radius:4px;padding:1px 4px;margin-left:4px}.category-warranty-publication-help{font-size:12px;line-height:1.6;margin:0;padding:0 24px 8px;color:var(--text-secondary,#526275);flex:0 0 auto}@media(max-width:679px){.category-warranty-publication-help{padding:0 16px 8px}}

@media(min-width:1024px){.finished-warranty-policy-card .finished-warranty-policy-table thead th:first-child{width:44%}.category-warranty-names{grid-template-columns:repeat(3,minmax(0,1fr))}.category-warranty-names > label:first-child{grid-column:auto}}

.finished-label-component-status { margin: 8px 0; border-left: 3px solid #3677b7; border-radius: 4px; padding: 9px 11px; background: #f1f6fb; color: #284665; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.finished-label-component-status.error { border-left-color: #bd353c; background: #fff3f3; color: #942b32; }
.finished-label-component-status[hidden] { display: none !important; }

/* Reception begins with the shipped order selected in the order list. */
#screen-sales-order-mgmt .sales-order-claim-entry { grid-column: 2; justify-self: end; }
#screen-sales-order-mgmt .sales-order-claim-entry button { min-height: 36px; padding: 6px 10px; border: 1px solid #b8cbdc; border-radius: 8px; background: #fff; color: #1d5278; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
#screen-sales-order-mgmt .sales-order-claim-entry button:hover { background: #edf5fc; }
#screen-sales-order-mgmt .sales-order-claim-entry button:focus-visible { outline: 3px solid #2278ad; outline-offset: 2px; }

/* Product detail shelf locations */
.sales-order-inventory-values { display: grid; gap: 4px; line-height: 1.5; overflow-wrap: anywhere; }
.sales-order-inventory-warning { display: block; color: #9a3412; }
#sales-product-shelf[hidden] { display: none; }
#sales-product-shelf .detail-sales-term-value { min-width: 0; font-size: 14px; line-height: 1.6; font-weight: 600; overflow-wrap: anywhere; }

#screen-search #sales-product-shelf { grid-template-columns: var(--sales-condition-label-width, 132px) minmax(0, 1fr); column-gap: var(--sales-condition-field-gap, 0px); align-items: start; text-align: left; }
#screen-search #sales-product-shelf .detail-sales-term-value { display: block; }

/* Print readiness is checked when internal order screens open. */
.order-print-readiness { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 16px; margin:0 0 16px; border:1px solid #bbd5cd; border-radius:8px; background:#eef8f3; color:#185642; }
.order-print-readiness[hidden] { display:none; }
.order-print-readiness.stopped { background:#fff4e8; border-color:#dfb881; color:#77440a; }
.order-print-readiness.checking { background:#eef4fb; border-color:#c1d4e8; color:#24517a; }
.order-print-readiness p { margin:4px 0 0; line-height:1.55; overflow-wrap:anywhere; }
.order-print-readiness-actions { display:flex; flex-shrink:0; align-items:center; gap:10px; }
.order-print-readiness-actions a,.order-print-readiness-actions button { padding:8px 12px; border:1px solid currentColor; border-radius:6px; color:inherit; background:transparent; text-decoration:none; font:inherit; cursor:pointer; }
.order-print-readiness-actions button:disabled { opacity:.6; cursor:wait; }
@media (max-width:600px) { .order-print-readiness { align-items:stretch; flex-direction:column; gap:10px; } .order-print-readiness-actions { flex-wrap:wrap; } }

#screen-search .sales-product-identity { padding-top: 6px; padding-bottom: 6px; }
/* Product identity shares rows so adding an ID cannot consume a new detail row. */
#screen-search .sales-product-identity-copy { display: grid; grid-template-columns: fit-content(60%) minmax(0, 1fr); align-items: center; gap: 3px 12px; flex: 1 1 auto; }
#screen-search .sales-product-identity h2 { grid-column: 1; grid-row: 1; }
#screen-search .sales-product-id { grid-column: 2; grid-row: 2; justify-self: end; margin-top: 0; text-align: end; }
#screen-search .sales-product-category { grid-column: 1; grid-row: 2; margin-top: 0; }
#screen-search .sales-product-status { grid-column: 1; grid-row: 3; margin-top: 0; }
#screen-search .sales-product-warranty { grid-column: 2; grid-row: 3; margin: 0; }
@media (max-width: 767px) {
  #screen-search .sales-product-identity-copy { grid-template-columns: minmax(0, 1fr) max-content; gap: 3px 8px; }
  #screen-search .sales-product-identity h2 { grid-column: 1 / -1; }
  #screen-search .sales-product-category { grid-column: 1; grid-row: 2; }
  #screen-search .sales-product-status { grid-column: 1 / -1; grid-row: 3; }
  #screen-search .sales-product-warranty { grid-column: 1 / -1; grid-row: 4; }
}

/* Keep customer and sales-term labels in their original vertical order. */
#screen-search .detail-customer-section #product-kind-stock-wrap > .product-kind-stock-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
#screen-search .detail-customer-section #product-kind-stock-wrap .product-kind-stock-row { min-width: 0; align-items: start; }
#screen-search .detail-customer-section #product-kind-stock-wrap .sales-product-shelf-row .detail-sales-term-value { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  #screen-search .detail-customer-section #product-kind-stock-wrap .product-kind-stock-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (min-width: 1024px) {
  #screen-search .sales-conditions-panel { padding: 4px 16px; gap: 3px 16px; }
  #screen-search .sales-conditions-title { font-size: 18px; }
  #screen-search .sales-shipping-controls label { gap: 1px; }
  #screen-search .sales-shipping-controls select { min-height: 28px; }
  #screen-search .detail-customer-section .product-kind-control { margin-top: 0; }
  #screen-search .sales-conditions-panel .detail-customer-price-focus { min-height: 34px; padding-top: 4px; padding-bottom: 4px; }
}
@media (min-width: 1024px) and (max-height: 820px) {
  #screen-search .sales-product-identity { padding-top: 3px; padding-bottom: 3px; }
  #screen-search .sales-conditions-panel { padding-top: 2px; padding-bottom: 2px; row-gap: 2px; }
  #screen-search .sales-conditions-title { line-height: 1.2; }
  #screen-search .sales-conditions-panel .detail-customer-select { min-height: 34px; padding-top: 3px; padding-bottom: 3px; }
  #screen-search .detail-customer-section .detail-sales-term-row { min-height: 28px; }
  #screen-search .detail-customer-section .detail-sales-term-value { padding-top: 2px; padding-bottom: 2px; }
  #screen-search .detail-customer-section .product-kind-select { min-height: 30px; padding-top: 2px; padding-bottom: 2px; }
  #screen-search .sales-conditions-panel .detail-customer-price-focus { min-height: 30px; padding-top: 2px; padding-bottom: 2px; }
  #screen-search .sales-detail-tabs { min-height: 32px; }
  #screen-search .sales-detail-tab { height: 32px; min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
  #sales-detail-basic { padding: 0 12px; }
  #sales-detail-basic .detail-main-grid { gap: 2px; padding-bottom: 0; }
  #sales-detail-basic .detail-main-grid .detail-spec-after-maker { margin-top: 2px; }
  #sales-detail-basic .detail-main-grid .detail-block-title { margin-bottom: 0; }
  #sales-detail-basic .detail-main-grid .ac-part-row,
  #sales-detail-basic .detail-main-grid .detail-vehicle-maker-grid { grid-template-columns: 140px minmax(0, 1fr); }
  #sales-detail-basic .detail-main-grid .ac-part-label { padding-right: 2px; }
  #sales-detail-basic .detail-main-grid .detail-vehicle-label,
  #sales-detail-basic .detail-main-grid .detail-vehicle-value,
  #sales-detail-basic .detail-main-grid .ac-part-row { min-height: 20px; }
  #sales-detail-basic .detail-main-grid .detail-vehicle-label,
  #sales-detail-basic .detail-main-grid .detail-vehicle-value,
  #sales-detail-basic .detail-main-grid .ac-part-label,
  #sales-detail-basic .detail-main-grid .ac-part-value { padding-top: 1px; padding-bottom: 1px; line-height: 1.2; }
  #sales-detail-basic .detail-main-grid .detail-spec-grid { grid-template-columns: auto max-content auto minmax(0, 1fr); }
  #screen-search .sales-conditions-terms .core-return-policy-panel.vertical .core-return-policy-item { min-height: 26px; }
  #screen-search .sales-conditions-terms .core-return-policy-panel.vertical .core-return-policy-item span,
  #screen-search .sales-conditions-terms .core-return-policy-panel.vertical .core-return-policy-item strong { padding-top: 3px; padding-bottom: 3px; }
  #screen-search .sales-basic-compatible-wrap { max-height: 144px; }
}

@media (min-width: 1024px) and (max-width: 1200px) {
  #screen-search .detail-customer-section #product-kind-stock-wrap .product-kind-stock-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* Use a consistent rhythm without moving the established field columns. */
#screen-search .sales-conditions-panel .detail-customer-head { min-height: 38px; margin-bottom: 0; align-items: center; }
#screen-search .detail-customer-section .product-kind-control { margin-top: 0; }
#screen-search .detail-customer-section .detail-sales-kind-row { min-height: 38px; margin-bottom: 0; padding-top: 0; align-items: center; }
#screen-search .sales-conditions-panel .detail-customer-price-focus,
#screen-search .sales-conditions-panel .detail-customer-price-focus.empty { min-height: 38px; padding-top: 4px; padding-bottom: 4px; box-sizing: border-box; align-items: center; }
#screen-search .detail-customer-section #product-kind-stock-wrap .product-kind-stock-row { min-height: 38px; }
#screen-search .detail-customer-section #product-kind-stock-wrap .detail-sales-term-label { padding-top: 9px; padding-bottom: 9px; line-height: 20px; }
#screen-search .detail-customer-section #product-kind-stock-wrap .product-kind-stock-row:not(.sales-product-shelf-row) .detail-sales-term-value { padding-top: 5px; padding-bottom: 5px; line-height: 28px; }
#screen-search .detail-customer-section #product-kind-stock-wrap .sales-product-shelf-row .detail-sales-term-value { padding-top: 9px; padding-bottom: 9px; line-height: 20px; }
#screen-search .sales-conditions-panel .detail-customer-shipping-rule { margin-top: 4px; }
#sales-shipping-estimate-wrap > .sales-shipping-result.no-island { grid-column: 1 / -1; }
@media (min-width: 1024px) and (max-height: 820px) {
  #screen-search .sales-conditions-panel .detail-customer-head,
  #screen-search .detail-customer-section .detail-sales-kind-row,
  #screen-search .detail-customer-section #product-kind-stock-wrap .product-kind-stock-row { min-height: 32px; }
  #screen-search .sales-conditions-panel .detail-customer-select { min-height: 32px; padding-top: 2px; padding-bottom: 2px; }
  #screen-search .detail-customer-section .product-kind-select { min-height: 32px; }
  #screen-search .sales-conditions-panel .detail-customer-price-focus,
  #screen-search .sales-conditions-panel .detail-customer-price-focus.empty { min-height: 32px; padding-top: 2px; padding-bottom: 2px; }
  #screen-search .detail-customer-section #product-kind-stock-wrap .detail-sales-term-label,
  #screen-search .detail-customer-section #product-kind-stock-wrap .sales-product-shelf-row .detail-sales-term-value { padding-top: 6px; padding-bottom: 6px; }
  #screen-search .detail-customer-section #product-kind-stock-wrap .product-kind-stock-row:not(.sales-product-shelf-row) .detail-sales-term-value { padding-top: 2px; padding-bottom: 2px; }
}

/* Keep translated footer captions on one line without narrowing stock/shelf values. */
#screen-search .sales-conditions-panel .detail-customer-shipping-rule,
#screen-search .sales-conditions-terms .core-return-policy-panel.vertical .core-return-policy-item { grid-template-columns: minmax(var(--sales-condition-label-width, 76px), max-content) minmax(0, 1fr); }

/* Keep the charge rule on the left and guide only an unselected destination. */
#screen-search .detail-customer-shipping-rule > .sales-shipping-destination-guide { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-self: start; gap: 6px; min-width: 0; max-width: 100%; padding: 2px 0; border: 0; background: transparent; color: #1a6fd4; font: inherit; font-size: 13px; line-height: 1.4; text-align: left; cursor: pointer; }
#screen-search .sales-shipping-destination-guide[hidden] { display: none; }
.sales-shipping-destination-guide > span:first-child { min-width: 0; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 2px; }
.sales-shipping-guide-arrow { flex: 0 0 auto; font-size: 18px; line-height: 1; }
.sales-shipping-guide-arrow::before { content: "→"; }
.sales-shipping-destination-guide:focus-visible { outline: 2px solid #1a6fd4; outline-offset: 3px; }
#sales-shipping-prefecture.needs-destination { border-color: #1a6fd4; background: #f1f7ff; }
@media (max-width: 980px) { .sales-shipping-guide-arrow::before { content: "↓"; } }

@media (min-width: 1024px) and (max-height: 820px) {
  #screen-search .detail-customer-shipping-rule > .sales-shipping-destination-guide { padding-top: 0; padding-bottom: 0; }
}

/* Quote amounts belong beside the charge rule in the left sales column. */
#screen-search .sales-shipping-charge-value { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
#screen-search .sales-shipping-charge-amount { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
#screen-search .sales-shipping-charge-amount .shipping-rate-fee { color: #15703a; font-size: 18px; line-height: 1.2; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
#screen-search .sales-shipping-charge-amount .shipping-rate-fee.pending { font-size: 13px; white-space: normal; }
#screen-search .sales-shipping-charge-amount .shipping-rate-tax-label { margin: 0; font-size: 12px; line-height: 1.5; }
#screen-search .sales-shipping-charge-details { grid-column: 1 / -1; min-width: 0; }
#screen-search .sales-shipping-charge-details > :first-child { margin-top: 0; }
#screen-search .sales-shipping-charge-amount[hidden], #screen-search .sales-shipping-charge-details[hidden] { display: none; }

/* Core collection vehicle classes: use the existing product/type cell. */
.core-vehicle-label { margin-top: 4px; color: #31526e; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.core-vehicle-label > span { font-weight: 700; }
.core-vehicle-field { min-width: 0; margin: 0 0 10px; padding: 8px 10px; border: 1px solid #d3deea; border-radius: 6px; }
.core-vehicle-field legend { padding: 0 4px; color: #34445a; font-size: 13px; font-weight: 700; }
.core-vehicle-options { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.core-vehicle-options label { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; font-size: 14px; cursor: pointer; }
.core-vehicle-options input { width: 17px; height: 17px; accent-color: #d4002b; }
#screen-core-list-mgmt :is(#core-collection-vehicle-filters, #core-inventory-vehicle-filters) {
  grid-column: 1 / -1;
  margin: 0;
  padding: 3px 8px 5px;
}
:is(#core-collection-vehicle-filters, #core-inventory-vehicle-filters) .core-vehicle-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 8px;
}
#screen-core-list-mgmt :is(#core-collection-vehicle-filters, #core-inventory-vehicle-filters) .core-vehicle-options label {
  display: flex;
  gap: 5px;
  min-height: 28px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
:is(#core-collection-vehicle-filters, #core-inventory-vehicle-filters) .core-vehicle-options input {
  flex: none;
  margin: 0;
}
#screen-core-list-mgmt #core-workspace-filter-options > .core-workspace-filter-fields {
  gap: 6px 10px;
}
#screen-core-list-mgmt :is(.core-collection-rank-controls, .core-collection-rank-value) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
}
#screen-core-list-mgmt .core-collection-rank-value {
  align-items: center;
  white-space: nowrap;
}
#screen-core-list-mgmt .core-collection-rank-value .mgmt-search {
  grid-column: auto;
  height: 40px;
  padding-inline: 8px;
}
#screen-core-list-mgmt .core-collection-rank-controls .core-workspace-clear { grid-column: 2; white-space: nowrap; }
@media (max-width: 540px) {
  :is(#core-collection-vehicle-filters, #core-inventory-vehicle-filters) .core-vehicle-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #screen-core-list-mgmt #core-workspace-filter-options > .core-workspace-filter-fields {
    position: fixed;
    inset: auto 10px 12px;
    width: auto;
  }
  #screen-core-list-mgmt #core-workspace-filter-options .core-workspace-filter-fields > label {
    grid-column: 1 / -1;
    grid-template-columns: minmax(78px, 1fr) minmax(0, 2fr);
    align-items: center;
  }
  #screen-core-list-mgmt .core-collection-rank-controls { grid-column: 1 / -1; }
  #screen-core-list-mgmt #core-workspace-filter-options .core-workspace-filter-fields :is(.form-select, .core-workspace-clear, #core-collection-rank-limit) {
    height: 36px;
    min-height: 36px;
    padding-block: 5px;
  }
}
.core-vehicle-help { margin: 5px 0 0; font-size: 12px; line-height: 1.5; color: #52657a; }
#screen-core-list-mgmt .core-workspace-filter-fields { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
@media (max-width: 1100px) { #screen-core-list-mgmt .core-workspace-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Compact workspace shared by the collection and inventory tabs. */
#screen-core-list-mgmt .core-workspace { padding: 10px 16px 12px; }
#screen-core-list-mgmt .core-workspace-heading { margin-bottom: 6px; }
#screen-core-list-mgmt .core-workspace-heading h1 { font-size: 21px; margin: 0; }
#screen-core-list-mgmt .core-workspace-heading p { display: none; }
#screen-core-list-mgmt .core-list-mode-switch { margin-bottom: 8px; }
#screen-core-list-mgmt .core-list-mode-btn { min-width: 140px; padding: 5px 12px; }
#screen-core-list-mgmt .core-list-mode-btn span { display: none; }
#screen-core-list-mgmt .core-workspace-section-heading { margin-bottom: 6px; }
#screen-core-list-mgmt .core-workspace-section-heading h2 { margin: 0; font-size: 16px; }
#screen-core-list-mgmt .core-workspace-section-heading p { display: none; }
#screen-core-list-mgmt :is(.core-list-collection-toolbar, .core-list-inventory-toolbar) .core-workspace-filters { position: relative; padding: 8px; grid-template-columns: minmax(0, 1fr) auto auto; }
#screen-core-list-mgmt :is(.core-list-collection-toolbar, .core-list-inventory-toolbar) .core-workspace-search > span { display: none; }
#screen-core-list-mgmt :is(.core-list-collection-toolbar, .core-list-inventory-toolbar) .core-workspace-filter-options { grid-column: auto; border: 0; }
#screen-core-list-mgmt :is(.core-list-collection-toolbar, .core-list-inventory-toolbar) .core-workspace-filter-options > summary { display: list-item; min-height: 0; padding: 10px; cursor: pointer; font-size: 13px; }
#screen-core-list-mgmt :is(.core-list-collection-toolbar, .core-list-inventory-toolbar) .core-workspace-filter-options:not([open]) > .core-workspace-filter-fields { display: none; }
#screen-core-list-mgmt :is(.core-list-collection-toolbar, .core-list-inventory-toolbar) .core-workspace-filter-fields { position: absolute; z-index: 5; top: 100%; right: 0; width: min(650px, 100%); padding: 12px; box-sizing: border-box; background: #fff; border: 1px solid #bdc8d6; border-radius: 6px; box-shadow: 0 4px 12px #172b4626; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#screen-core-list-mgmt .mgmt-toolbar { margin-bottom: 8px; }
#screen-core-list-mgmt .core-list-collection-toolbar .core-workspace-actions { padding-top: 6px; gap: 6px; }
#screen-core-list-mgmt .core-list-collection-toolbar .core-workspace-actions button { padding: 5px 9px; min-height: 34px; }
#screen-core-list-mgmt .core-workspace-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
#screen-core-list-mgmt .core-summary-item { padding: 5px 9px; }
#screen-core-list-mgmt .core-summary-item strong { font-size: 21px; margin: 0; }
#screen-core-list-mgmt .core-summary-item small { margin-left: 3px; }
#screen-core-list-mgmt .core-workspace-results { overflow: visible; }
#screen-core-list-mgmt .core-workspace-results-heading { padding: 6px 12px; }
#screen-core-list-mgmt .core-collection-table { width: 100%; table-layout: fixed; min-width: 0 !important; }
#screen-core-list-mgmt #core-list-list .core-collection-table { min-width: 0 !important; }
#screen-core-list-mgmt #core-list-list .core-collection-table th, #screen-core-list-mgmt #core-list-list .core-collection-table td { width: auto; padding: 8px; }
#screen-core-list-mgmt #core-list-list .core-collection-table :is(th,td):nth-child(1) { width: 10%; }
#screen-core-list-mgmt #core-list-list .core-collection-table :is(th,td):nth-child(2) { width: 25%; }
#screen-core-list-mgmt #core-list-list .core-collection-table :is(th,td):nth-child(3) { width: 18%; }
#screen-core-list-mgmt #core-list-list .core-collection-table :is(th,td):nth-child(4) { width: 21%; }
#screen-core-list-mgmt #core-list-list .core-collection-table :is(th,td):nth-child(5), #screen-core-list-mgmt #core-list-list .core-collection-table :is(th,td):nth-child(6) { width: 8%; }
#screen-core-list-mgmt #core-list-list .core-collection-table :is(th,td):nth-child(7) { width: 10%; text-align: right; }
#screen-core-list-mgmt #core-list-load-more-wrap { align-items: center; justify-content: center; gap: 14px; margin: 0; padding: 6px; }
@media (max-width: 1100px) {
 #screen-core-list-mgmt .core-workspace { padding: 6px 10px; }
 #screen-core-list-mgmt .core-workspace-heading { display: none; }
 #screen-core-list-mgmt .core-list-mode-switch { margin-bottom: 6px; }
 #screen-core-list-mgmt :is(.core-list-collection-toolbar, .core-list-inventory-toolbar) .core-workspace-filters { padding: 5px; gap: 5px; }
 #screen-core-list-mgmt :is(.core-list-collection-toolbar, .core-list-inventory-toolbar) .core-workspace-filter-options > summary { padding: 8px 3px; font-size: 12px; }
 #screen-core-list-mgmt .core-list-collection-toolbar .core-workspace-actions { display: flex; flex-wrap: wrap; }
 #screen-core-list-mgmt .core-list-collection-toolbar .core-workspace-create { display: flex; flex-wrap: wrap; gap: 4px; }
 #screen-core-list-mgmt .core-list-collection-toolbar .core-workspace-actions button { width: auto !important; font-size: 12px; min-height: 30px; padding: 4px 6px; }
 #screen-core-list-mgmt .core-summary-item { padding: 4px 6px; }
 #screen-core-list-mgmt .core-summary-item strong { font-size: 19px; }
 #screen-core-list-mgmt .core-collection-card { padding: 9px; }
 #screen-core-list-mgmt .core-collection-card .core-collection-qty-grid > div { padding: 4px; }
 #screen-core-list-mgmt .core-collection-card .core-collection-qty-grid strong { font-size: 19px; }
 #screen-core-list-mgmt .core-collection-card .core-list-card-actions button { min-height: 32px; }
 #screen-core-list-mgmt .core-collection-card .core-collection-meta { margin: 2px 0; }
 #core-collection-form-overlay .form-card { padding: 12px; }
 #core-collection-form-overlay .form-row { margin-bottom: 8px; }
 #core-collection-form-overlay .core-collection-selected-product { padding: 6px 8px; margin-bottom: 6px; }
}

#screen-core-list-mgmt .core-workspace-results-heading { position: relative; align-items: center; }
#screen-core-list-mgmt .core-collection-output-actions { display: none; margin-inline-start: auto; align-items: center; gap: 6px; }
#screen-core-list-mgmt:has(#btn-core-list-mode-collection.active) .core-collection-output-actions { display: flex; }
#btn-core-collection-print { white-space: nowrap; }
#screen-core-list-mgmt .core-actions-menu > summary { cursor: pointer; font-size: 13px; padding: 4px; }
#screen-core-list-mgmt .core-actions-menu > .core-workspace-actions { display: none; }
#screen-core-list-mgmt .core-actions-menu[open] > .core-workspace-actions { display: grid; position: absolute; z-index: 6; right: 0; top: 100%; max-width: 100%; padding: 10px; background: #fff; border: 1px solid #bdc8d6; box-sizing: border-box; border-radius: 6px; box-shadow: 0 4px 12px #172b4626; }
#screen-core-list-mgmt .core-actions-menu[open] > .core-workspace-actions {
  box-sizing: border-box;
  width: min(360px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
#screen-core-list-mgmt .core-actions-menu .core-workspace-create { display: contents; }
#screen-core-list-mgmt .core-actions-menu button {
  width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
 #screen-core-list-mgmt .core-collection-card-head { padding-bottom: 2px; border: 0; }
 #screen-core-list-mgmt .core-collection-card-head .core-main-pn { width: 100%; }
 #screen-core-list-mgmt .core-collection-card-badges { padding: 2px 0; }
 #screen-core-list-mgmt .core-collection-card .core-collection-qty-grid { margin: 4px 0; }
 #screen-core-list-mgmt .core-collection-card .core-collection-qty-grid > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
 #screen-core-list-mgmt .core-collection-card .core-stock-badge { min-height: 20px; padding: 3px 4px; text-align: center; }
 #screen-core-list-mgmt .core-collection-card .core-list-card-actions { margin-top: 4px; gap: 4px; }
 #screen-core-list-mgmt .core-collection-card .core-list-card-actions button { padding: 4px 7px; }
 #screen-core-list-mgmt .core-summary-note { font-size: 12px; }
}

@media (max-width: 1100px) {
 #screen-core-list-mgmt .core-collection-card .core-list-card-actions { display: flex; justify-content: flex-end; }
 #screen-core-list-mgmt .core-collection-card .core-list-card-actions button { min-width: 0; min-height: 32px; font-size: 13px; }
 #screen-core-list-mgmt .core-workspace-results-heading { padding: 3px 0; }
 #screen-core-list-mgmt #core-list-load-more-wrap { padding: 4px; gap: 10px; }
 #screen-core-list-mgmt #core-list-load-more { min-height: 30px; padding: 4px 12px; font-size: 13px; }
}

#core-collection-form-overlay .hidden { display: none !important; }
#core-collection-form-overlay .reg-error:empty { display: none; }
#core-collection-form-overlay .form-footer { margin-top: 6px; padding-top: 6px; }
@media (max-width: 1100px) {
 #screen-core-list-mgmt .core-list-mode-switch { padding: 2px; }
 #screen-core-list-mgmt .core-list-mode-btn { padding: 3px 6px; min-height: 28px; }
 #screen-core-list-mgmt .mgmt-toolbar { margin-bottom: 4px; }
 #screen-core-list-mgmt .core-summary-item { padding: 2px 5px; }
 #screen-core-list-mgmt .core-summary-item strong { font-size: 18px; }
 #screen-core-list-mgmt #core-list-load-more-wrap button { min-height: 28px; padding: 4px 10px; }
 #core-collection-form-overlay .core-vehicle-options { gap: 2px 8px; }
 #core-collection-form-overlay .core-vehicle-options label { min-height: 28px; }
 #core-collection-form-overlay .core-vehicle-field { padding: 5px 8px; margin-bottom: 6px; }
}

@media (max-width: 1100px) { #screen-core-list-mgmt .core-workspace-summary { margin-bottom: 2px; } #screen-core-list-mgmt .core-workspace { padding-bottom: 2px; } }


@media (max-width: 1100px) { #screen-core-list-mgmt .core-list-mode-switch { margin-bottom:2px; } #screen-core-list-mgmt :is(.core-list-collection-toolbar, .core-list-inventory-toolbar) .core-workspace-filters { padding:3px; } #screen-core-list-mgmt .core-workspace-summary { margin-bottom:0; } #core-collection-form-overlay h3 { margin-bottom:8px; } #core-collection-form-overlay .form-card { padding:10px; } }

@media (max-width: 1100px) { #screen-core-list-mgmt .core-workspace-summary { row-gap:2px; } }

#screen-core-list-mgmt:has(#btn-core-list-mode-inventory.active) .core-actions-menu,
#screen-core-list-mgmt:has(#btn-core-list-mode-collection.active) .core-inventory-add { display: none; }

#screen-core-list-mgmt:has(#btn-core-list-mode-inventory.active) .core-workspace-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#screen-core-list-mgmt .core-workspace-inventory-filters { justify-content: stretch; }
#screen-core-list-mgmt #core-inventory-filter-options .core-workspace-filter-fields {
  width: min(470px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}
#screen-core-list-mgmt #core-inventory-filter-options .core-workspace-clear { grid-column: 1 / -1; }
@media (max-width: 540px) {
  #screen-core-list-mgmt #core-inventory-filter-options .core-workspace-filter-fields {
    position: fixed;
    inset: auto 10px 12px;
    width: auto;
  }
  #screen-core-list-mgmt #core-inventory-filter-options .core-workspace-filter-fields > label {
    grid-column: 1 / -1;
    grid-template-columns: minmax(78px, 1fr) minmax(0, 2fr);
    align-items: center;
  }
  #screen-core-list-mgmt #core-inventory-filter-options .core-workspace-filter-fields :is(.form-select, .mgmt-search, .core-workspace-clear) {
    height: 36px;
    min-height: 36px;
    padding-block: 5px;
  }
}
#screen-core-list-mgmt #core-list-list .core-list-table { width: 100%; min-width: 0 !important; table-layout: fixed; }
#screen-core-list-mgmt #core-list-list .core-list-table :is(th, td) { padding: 8px; }
#screen-core-list-mgmt .core-list-table th:nth-child(1) { width: 16%; }
#screen-core-list-mgmt .core-list-table th:nth-child(2) { width: 13%; }
#screen-core-list-mgmt .core-list-table th:nth-child(3) { width: 17%; }
#screen-core-list-mgmt .core-list-table th:nth-child(4) { width: 12%; }
#screen-core-list-mgmt .core-list-table th:nth-child(6) { width: 15%; }
#screen-core-list-mgmt .core-list-table th:nth-child(7) { width: 13%; }
#screen-core-list-mgmt .core-list-table .mgmt-actions { flex-wrap: wrap; }
#screen-core-list-mgmt .core-inventory-add { min-height: 30px; padding: 4px 10px; font-size: 13px; }
#screen-core-list-mgmt .core-list-card { overflow-wrap: anywhere; }
#screen-core-list-mgmt .core-list-card-head > div { min-width: 0; }
#screen-core-list-mgmt .core-list-card-head .core-qty-pill { flex: none; }
#screen-core-list-mgmt .core-list-maker-pn { display: block; margin-top: 0 !important; }
@media (max-width: 430px) {
  #screen-core-list-mgmt .core-list-card-field .core-list-card-label { display: inline; margin: 0 4px 0 0; }
  #screen-core-list-mgmt .core-list-card-field-wide { grid-column: 1 / -1; }
  #screen-core-list-mgmt .core-list-card-head .mgmt-sub { margin-top: 1px; line-height: 1.35; }
  #screen-core-list-mgmt .core-list-maker-pn { display: inline; }
  #screen-core-list-mgmt .core-list-maker-pn::before { content: " / "; }
}
@media (max-width: 1100px) {
  #screen-core-list-mgmt .core-list-card { padding: 9px; }
  #screen-core-list-mgmt .core-list-card-grid { gap: 4px 8px; padding: 4px 0; }
  #screen-core-list-mgmt .core-list-card-note { padding: 4px 0; }
  #screen-core-list-mgmt .core-list-card-actions { gap: 4px; padding-top: 4px; }
  #screen-core-list-mgmt .core-list-card-actions button { min-height: 32px; padding: 4px; }
}
@media (max-width: 430px) {
  #screen-core-list-mgmt .core-list-card { padding-block: 7px; }
  #screen-core-list-mgmt .core-list-card-grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); row-gap: 2px; }
}
@media (max-width: 767px) {
  #screen-core-list-mgmt .core-list-mode-btn { min-width: 0; }
  #screen-core-list-mgmt #btn-core-list-search { padding-inline: 9px; }
}


#screen-core-list-mgmt:has(#btn-core-list-mode-inventory.active) .core-workspace-section-heading { display: none; }
#screen-core-list-mgmt.active:has(:is(#btn-core-list-mode-inventory, #btn-core-list-mode-collection).active) {
  height: 100dvh;
  min-height: 0;
}
#screen-core-list-mgmt:has(:is(#btn-core-list-mode-inventory, #btn-core-list-mode-collection).active) .core-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
  overflow: visible;
}
#screen-core-list-mgmt:has(:is(#btn-core-list-mode-inventory, #btn-core-list-mode-collection).active) #core-management-panel,
#screen-core-list-mgmt:has(:is(#btn-core-list-mode-inventory, #btn-core-list-mode-collection).active) .core-workspace-results {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#screen-core-list-mgmt:has(:is(#btn-core-list-mode-inventory, #btn-core-list-mode-collection).active) .core-workspace-results {
  flex: 1 1 0;
}
#screen-core-list-mgmt:has(:is(#btn-core-list-mode-inventory, #btn-core-list-mode-collection).active) :is(.core-workspace-results-heading, .mgmt-toolbar, .core-workspace-summary) {
  flex: none;
}
#screen-core-list-mgmt:has(:is(#btn-core-list-mode-inventory, #btn-core-list-mode-collection).active) #core-list-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
#screen-core-list-mgmt #core-list-list:focus-visible {
  outline: 2px solid var(--dcats-focus);
  outline-offset: -2px;
}
#screen-core-list-mgmt #core-list-list :is(.core-list-table, .core-collection-table) {
  overflow: visible;
}
#screen-core-list-mgmt #core-list-list :is(.core-list-table, .core-collection-table) thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
#screen-core-list-mgmt:has(#btn-core-list-mode-inventory.active) #core-list-list .core-main-pn { font-size: 14px; line-height: 1.35; word-break: break-all; }
@media (max-width: 1100px) {
  #screen-core-list-mgmt:has(#btn-core-list-mode-inventory.active) .core-summary-item { display: flex; flex-wrap: wrap; gap: 3px 6px; justify-content: space-between; align-items: baseline; }
  #screen-core-list-mgmt .core-list-card-head { padding-bottom: 4px; }
  #screen-core-list-mgmt .core-list-card-note { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 0; }
  #screen-core-list-mgmt .core-list-card-note .mgmt-sub { margin-top: 0; line-height: 1.35; }
  #screen-core-list-mgmt .core-list-card-note button { flex: none; min-height: 29px; }
}

#core-inventory-note-dialog {
  width: min(420px, calc(100vw - 24px));
  margin: auto;
  padding: 14px;
  border: 1px solid #bdc8d6;
  border-radius: 8px;
  background: #fff;
  color: #243b53;
}
#core-inventory-note-dialog::backdrop { background: #18263c66; }
#core-inventory-note-dialog h3 { margin: 0 0 6px; }
#core-inventory-note-dialog [hidden] { display: none; }
#core-inventory-note-dialog form { margin-top: 8px; display: flex; justify-content: flex-end; }

#screen-core-list-mgmt #core-collection-previous.hidden, #screen-core-list-mgmt #core-collection-page-status.hidden { display:none !important; }


.component-catalog-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
}
/* Verified child counts are part of the control so they fit in one cell. */
.component-table-verified-catalog th.component-tree-col,
.component-table-verified-catalog td.component-tree-col { width: 56px; }
.component-table-verified-catalog [data-catalog-child-toggle] { padding: 0 5px; white-space: nowrap; }
@media (max-width: 760px) {
  #screen-components:has(.component-table-verified-catalog) .page-header-right {
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .component-table-verified-catalog,
  .component-table-verified-catalog > tbody { display: block; }
  .component-table-verified-catalog > tbody > tr:has(> th) { display: none; }
  .component-table-verified-catalog > tbody > .component-verified-catalog-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid #d7dce5;
  }
  .component-table-verified-catalog > tbody > .component-verified-catalog-row > td {
    width: auto;
    min-width: 0;
    padding: 3px 5px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    border-bottom: 0;
  }
  .component-table-verified-catalog .component-verified-catalog-row > td:nth-child(4) { grid-column: span 2; }
  .component-table-verified-catalog .component-verified-catalog-row > .component-action-col {
    position: static;
    box-shadow: none;
  }
  .component-table-verified-catalog .component-pn { white-space: normal; }
  .component-table-verified-catalog [data-component-catalog-label]::before {
    content: attr(data-component-catalog-label);
    display: block;
    color: #5f6877;
  }
  .component-table-verified-catalog .component-verified-catalog-row > td:nth-child(n+4)::before {
    display: inline;
    margin-right: 4px;
  }
  .component-table-verified-catalog [data-catalog-child-toggle] { min-height: 34px; }
}

#screen-core-list-mgmt:has(#btn-core-list-mode-pending.active) :is(.core-actions-menu, .core-inventory-add) { display: none; }
#screen-core-list-mgmt:has(#btn-core-list-mode-pending.active) .core-workspace-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#screen-core-list-mgmt .core-workspace-filters.core-pending-filters { grid-template-columns: minmax(0, 1fr) auto; }
#screen-core-list-mgmt .core-pending-table { table-layout: fixed; }
#screen-core-list-mgmt .core-pending-record :is(.core-main-pn, .core-pending-pallet) { overflow-wrap: anywhere; }
#screen-core-list-mgmt .core-pending-record .btn-sm-edit { flex: none; }
@media (max-width: 767px) {
  #screen-core-list-mgmt .core-list-mode-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #screen-core-list-mgmt .core-pending-filters .core-workspace-search { grid-column: auto; }
}

#screen-core-list-mgmt .core-pending-table :is(th, td) { text-align: left; }
#screen-core-list-mgmt:has(#btn-core-list-mode-pending.active) #core-collection-page-status { white-space: nowrap; flex: none; }
#screen-core-list-mgmt .core-pending-record .core-list-card-head > div { min-width: 0; flex: 1; }

/* The source workbook uses a blue header and one inventory record per row. */
.core-pallet-dialog {
  margin: auto;
  width: min(860px, calc(100vw - 20px));
  box-sizing: border-box;
  border: 1px solid #b7c9d9;
  border-radius: 9px;
  padding: 14px;
  color: #102c45;
  background: #fff;
}
.core-pallet-dialog::backdrop { background: rgb(16 35 55 / 42%); }
.core-pallet-dialog h3 { margin: 0; font-size: 1.1rem; }
.core-pallet-dialog .core-pallet-help { margin: 5px 0 10px; overflow-wrap: anywhere; }
.core-pallet-entry-head, .core-pallet-entry-row {
  display: grid;
  grid-template-columns: 36px minmax(105px, 1fr) minmax(125px, 1.35fr) minmax(112px, .55fr) minmax(150px, 1.8fr);
}
.core-pallet-entry-head {
  color: white;
  background: #1f4e78;
  font-weight: 700;
}
.core-pallet-entry-head span, .core-pallet-entry-no { padding: 7px; }
.core-pallet-entry-row { border: 1px solid #c1d0de; border-top: 0; background: #f1f7fc; }
.core-pallet-entry-row:nth-child(even) { background: #fff; }
.core-pallet-entry-row label { min-width: 0; border-left: 1px solid #c1d0de; }
.core-pallet-entry-row input { width: 100%; box-sizing: border-box; min-width: 0; min-height: 36px; border: 0; border-radius: 0; padding: 6px; background: transparent; color: inherit; font: inherit; }
#core-pallet-entry-rows input[data-field="quantity"] {
  background: #fff;
  color: #153b26;
  font-size: 18px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.core-pallet-entry-row input:focus-visible { outline: 2px solid #1f4e78; outline-offset: -2px; background: #fff; }
.core-pallet-entry-mobile-label { display: none; }
.core-pallet-line-controls, .core-pallet-footer, .core-pallet-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.core-pallet-line-controls { margin: 8px 0 4px; }
.core-pallet-footer { justify-content: flex-end; }
.core-pallet-message { margin: 4px 0; overflow-wrap: anywhere; }
.core-pallet-message:not(:empty) { min-height: 20px; }
.core-pallet-switch { margin-bottom: 8px; }
.core-pallet-switch [aria-pressed="true"] { background: #1f4e78; border-color: #1f4e78; color: white; }
#core-pallet-match-dialog { max-width: 600px; }
#core-pallet-match-dialog label:not(.core-pallet-batch) { display: block; min-width: 0; margin-bottom: 6px; }
#core-pallet-match-dialog .form-select, #core-pallet-match-dialog .form-input { width: 100%; min-width: 0; }
.core-pallet-candidate-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: end; }
.core-pallet-candidate-search button { margin-bottom: 6px; }
.core-pallet-batch:not([hidden]) { display: flex; align-items: flex-start; gap: 5px; }
.core-pallet-row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.core-pallet-row-actions button { white-space: nowrap; }
.core-pallet-dialog [hidden] { display: none !important; }
@media (max-width: 600px) {
  .core-pallet-dialog { padding: 9px; }
  .core-pallet-entry-head { display: none; }
  .core-pallet-entry-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid #c1d0de; }
  .core-pallet-entry-row label { border: 1px solid #c1d0de; padding: 2px; }
  .core-pallet-entry-no { grid-column: 1 / -1; padding: 3px 6px; color: #fff; background: #1f4e78; }
  .core-pallet-entry-mobile-label { display: block; padding: 2px 4px; font-size: .8rem; color: #163f62; }
  .core-pallet-dialog .core-pallet-footer { justify-content: flex-start; gap: 4px; }
  .core-pallet-dialog .btn-primary, .core-pallet-dialog .btn-sm-edit, .core-pallet-dialog .btn-cancel { padding-inline: 7px; }
}

.core-pallet-save-status:not([hidden]) { padding-block: 2px; overflow-wrap: anywhere; color: #1f4e78; }

.core-inventory-match-badge { display: inline-block; border-radius: 4px; padding: 2px 5px; background: #e7f1fa; color: #163f62; font-size: .75rem; }
#core-list-count.core-inventory-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
#core-list-count.core-inventory-summary .core-summary-item { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { #core-list-count.core-inventory-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

#screen-core-list-mgmt #btn-add-core-pending.hidden { display: none !important; }

#screen-core-list-mgmt .core-list-table :is(th, td).core-inventory-quantity { text-align: right; }
#screen-core-list-mgmt #core-list-list .core-qty-pill {
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.2;
}
#core-list-form-overlay .form-card { box-sizing: border-box; }
#core-list-form-overlay .form-label { color: #475569; }
#core-list-form-overlay .form-row { margin-bottom: 8px; }
#core-list-form-overlay .spec-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#core-list-form-overlay .spec-form-grid > * { min-width: 0; }
#core-list-form-overlay .core-inventory-quantity label { text-align: right; }
#clf-quantity, #core-pallet-adjust-qty {
  color: #153b26;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
#core-pallet-adjust-controls:not([hidden]) {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 28%);
  gap: 8px;
}
#core-pallet-adjust-controls > label:last-child { text-align: right; }
#core-pallet-adjust-controls > label:last-child span { overflow-wrap: anywhere; }
#core-list-form-overlay .core-list-edit-footer { flex-wrap: wrap; align-items: center; }
#core-list-form-overlay .core-list-edit-actions {
  display: flex;
  gap: 8px;
  margin-inline-start: auto;
}
#core-list-form-overlay #btn-core-list-delete-review { margin-inline-end: auto; }
#core-list-form-overlay .core-list-delete-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: baseline;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
#core-list-form-overlay .core-list-delete-details dt { color: #475569; }
#core-list-form-overlay .core-list-delete-details dd { margin: 0; overflow-wrap: anywhere; }
#core-list-form-overlay #core-list-delete-quantity { font-size: 23px; font-weight: 800; text-align: right; }
#core-list-form-overlay .core-list-delete-acknowledgement { display: flex; align-items: flex-start; gap: 8px; }
#core-list-form-overlay .core-list-delete-acknowledgement input { margin-top: 3px; }
#core-list-form-overlay #btn-core-list-delete-confirm { min-width: 76px; }
#core-list-form-overlay #btn-core-list-delete-confirm:disabled { opacity: .45; cursor: default; }
@media (max-width: 480px), (max-height: 640px) {
  #core-list-form-overlay .form-card { margin: 8px; padding: 14px; }
  #core-list-form-overlay .form-card h3 { margin-bottom: 8px; }
  #core-list-form-overlay .form-footer { margin-top: 8px; padding-top: 8px; }
}
#core-list-form-overlay [hidden] { display: none !important; }

#screen-core-list-mgmt #core-pending-outputs:not([hidden]) { display: inline-flex; flex-wrap: wrap; gap: 4px; }
#screen-core-list-mgmt #core-pending-outputs[hidden] { display: none; }
#screen-core-list-mgmt .core-pending-table :is(th, td).core-inventory-quantity { text-align: right; }
#screen-core-list-mgmt .core-pending-table th:nth-child(1) { width: 22%; }
#screen-core-list-mgmt .core-pending-table th:nth-child(2) { width: 29%; }
#screen-core-list-mgmt .core-pending-table th:nth-child(3) { width: 21%; }
#screen-core-list-mgmt .core-pending-table th:nth-child(4):not(:last-child) { width: 15%; }
#screen-core-list-mgmt .core-pending-table th:last-child { width: 13%; }
#screen-core-list-mgmt .core-pending-record > .core-pallet-row-actions { margin-top: 4px; justify-content: flex-end; }
@media (max-width: 480px) {
  #screen-core-list-mgmt:has(#btn-core-list-mode-pending.active) .core-workspace-results-heading { gap: 4px; }
  #screen-core-list-mgmt:has(#btn-core-list-mode-pending.active) .core-workspace-results-heading button {
    padding-inline: 6px;
  }
}
#core-collection-print-dialog { max-width: 440px; }
#core-collection-print-dialog label { display: grid; gap: 4px; }
#core-collection-print-dialog .core-pallet-footer { margin-top: 12px; }

/* Match the measuring widths to A4 minus the horizontal page margins below. */
.core-collection-print-measuring {
  position: fixed; inset: 0 auto auto 0; visibility: hidden; pointer-events: none; width: 194mm;
}
.core-collection-print-wide.core-collection-print-measuring { width: 281mm; }
.core-collection-print-content { color: black; font: 9pt/1.2 Arial, "Yu Gothic", "Meiryo", sans-serif; }
.core-collection-print-content h1 { font-size: 15pt; margin: 0 0 1.5mm; }
.core-collection-print-content p { margin: 0 0 2mm; }
.core-collection-print-content table { width: 100%; table-layout: auto; border-collapse: collapse; }
.core-collection-print-content thead { display: table-header-group; }
.core-collection-print-content tr { break-inside: avoid; }
.core-collection-print-content :is(th, td) {
  vertical-align: middle;
  padding: .45mm .8mm;
  border: .2mm solid #8e99a6;
  white-space: nowrap;
}
.core-collection-print-content th { background: #e7f1fa; color: #122c44; print-color-adjust: exact; }
.core-collection-print-content td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
/* Keep each part number and vehicle label intact, even on the widest sheets. */
.core-collection-print-split td:is(:nth-child(2), :nth-child(3)) { white-space: normal; }
.core-collection-print-split td:is(:nth-child(2), :nth-child(3)) :is(strong, span) { white-space: nowrap; }
@page core-collection-list { size: A4 portrait; margin: 9mm 8mm; }
@page core-collection-wide-list { size: A4 landscape; margin: 9mm 8mm; }
@media print {
  html:has(body.core-collection-printing), body.core-collection-printing { height: auto !important; overflow: visible !important; }
  body.core-collection-printing { display: block; margin: 0; background: white; color: black; }
  body.core-collection-printing > :not(#core-collection-print-sheet) { display: none !important; }
  body.core-collection-printing > #core-collection-print-sheet { display: block !important; }
  #core-collection-print-sheet > .core-collection-print-content { page: core-collection-list; }
  #core-collection-print-sheet > .core-collection-print-wide { page: core-collection-wide-list; }
}

@page core-pending-list { size: A4 portrait; margin: 13mm 11mm; }
@media print {
  html:has(body.core-pending-printing), body.core-pending-printing { height: auto !important; overflow: visible !important; }
  body.core-pending-printing { display: block; margin: 0; background: white; color: black; }
  body.core-pending-printing > :not(#core-pending-print-sheet) { display: none !important; }
  body.core-pending-printing > #core-pending-print-sheet {
    display: block !important; page: core-pending-list; font: 10pt Arial, "Yu Gothic", sans-serif;
  }
  #core-pending-print-sheet h1 { font-size: 16pt; margin: 0 0 4mm; }
  #core-pending-print-sheet h2 { font-size: 12pt; margin: 5mm 0 2mm; break-after: avoid; }
  #core-pending-print-sheet p { margin: 2mm 0; }
  #core-pending-print-sheet table { width: 100%; table-layout: fixed; border-collapse: collapse; }
  #core-pending-print-sheet thead { display: table-header-group; }
  #core-pending-print-sheet tr { break-inside: avoid; }
  #core-pending-print-sheet :is(th, td) { vertical-align: top; padding: 1.4mm; border: .25mm solid #8e99a6; overflow-wrap: anywhere; }
  #core-pending-print-sheet th { background: #e7f1fa; color: #122c44; print-color-adjust: exact; }
  #core-pending-print-sheet th:nth-child(1) { width: 8%; }
  #core-pending-print-sheet th:nth-child(2) { width: 16%; }
  #core-pending-print-sheet th:nth-child(3) { width: 23%; }
  #core-pending-print-sheet th:nth-child(4) { width: 12%; }
  #core-pending-print-sheet th:nth-child(5) { width: 26%; }
  #core-pending-print-sheet th:nth-child(6) { width: 15%; }
  #core-pending-print-sheet td:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
}

#screen-core-list-mgmt #core-list-list button.core-quantity-edit { border: 1px solid #9db9dd; border-radius: 5px; cursor: pointer; }
#screen-core-list-mgmt #core-list-list button.core-quantity-edit:hover { background: #d9e7fb; }
#screen-core-list-mgmt #core-list-list button.core-quantity-edit:focus-visible { outline: 2px solid var(--dcats-focus); outline-offset: 2px; }

/* Keep the screen guide alongside the existing header controls. */
.feature-help-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-inline-start: auto;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 5px;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.feature-help-link:hover { text-decoration: underline; }
.feature-help-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
#sales-accounting-export-overlay:not(:has(#sales-accounting-export-target option[value="yayoi_sales"]:checked)) .yayoi-help-link { display: none; }
@media print { .feature-help-link { display: none; } }

.page-header-right:has(> .feature-help-link) {
  margin-inline-start: auto;
  justify-content: flex-end;
  max-width: 100%;
}
@media (max-width: 600px) {
  .page-header:has(.feature-help-link) { column-gap: 5px; padding-inline: 8px; }
  .page-header-right:has(> .feature-help-link) { column-gap: 4px; }
  .page-header-right:has(> .feature-help-link) > :is(.header-username, .role-badge):empty { display: none; }
}

@media (max-width: 600px) {
  .page-header:has(.page-header-right .feature-help-link) :is(.back-btn,.btn-logout) { padding-inline: 6px; }
  .page-header:has(.page-header-right .feature-help-link) .page-header-left { column-gap: 4px; }
  .page-header:has(.page-header-right .feature-help-link) .feature-help-link { padding-inline: 4px; }
}
@media (max-width: 600px) {
  .page-header-right:has(> .feature-help-link) { gap: 3px; }
  .page-header-right:has(> .feature-help-link) .lang-btn { padding-inline: 3px; }
  .page-header-right:has(> .feature-help-link) .role-badge { padding-inline: 3px; }
  .page-header-right:has(> .feature-help-link) .btn-logout { padding-inline: 4px; }
}
@media (max-width: 360px) {
  .feature-help-title-row:has(.feature-help-link) { row-gap: 4px; }
  .feature-help-title-row:has(.feature-help-link) .page-header-left { max-width: calc(100% - 49px); min-width: 0; flex-wrap: wrap; row-gap: 2px; }
  .feature-help-title-row .page-header-right:has(> .feature-help-link) { flex: 1 0 100%; }
  .feature-help-title-row .page-header-right > .feature-help-link { position: absolute; top: 9px; inset-inline-end: 8px; }
  :is(#screen-search, #screen-finished-label-mgmt) .feature-help-title-row .logo-text { padding-left: 0; background-image: none; letter-spacing: normal; font-size: 15px; }
  #screen-menu .page-header:has(.feature-help-link) .logo-sub { display: none; }
}

/* Keep return-slip preparation and its print guidance visible together. */
@media (max-width: 700px), (max-height: 640px) {
  .shipping-document-settings-card:has(#shipping-document-return-waybill-section) :is(.shipping-document-settings-heading, #shipping-document-settings-content, .form-footer) { padding: 8px 12px; }
  #shipping-document-return-waybill-section .shipping-document-section-head { display: flex; flex-direction: row; align-items: flex-start; gap: 6px; }
  #shipping-document-return-waybill-section .shipping-document-section-head h3 { display: none; } /* The dialog heading names this form. */
  #shipping-document-return-waybill-section .shipping-document-section-head p { margin: 0; }
  #shipping-document-return-waybill-section .shipping-document-ready-state { width: auto; flex: none; }
  #shipping-document-return-waybill-section .shipping-document-carrier-context { padding: 3px 6px; margin: 4px 0; }
  #shipping-document-return-waybill-section .shipping-document-waybill-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #shipping-document-return-waybill-section .shipping-document-waybill-form > label:last-of-type { grid-column: 1 / -1; }
  #shipping-document-return-waybill-section .shipping-document-waybill-form > button { grid-column: 1 / -1; width: 100%; }
  #shipping-document-return-waybill-section .shipping-document-waybill-print-row { flex-direction: row; align-items: center; padding-top: 5px; margin-top: 5px; }
  #shipping-document-return-waybill-section .shipping-document-waybill-print-row > div { min-width: 0; }
  #shipping-document-return-waybill-section .shipping-document-waybill-print-row > a { width: auto; }
  .shipping-document-settings-card:has(#shipping-document-return-waybill-section) .sales-order-detail-message:empty { min-height: 0; }
}

@media (max-width: 480px), (max-height: 620px) {
  .shipping-document-settings-card:has(.shipping-return-sheet-form) :is(.shipping-document-settings-heading, #shipping-document-settings-content, .form-footer) { padding: 8px 12px; }
  .shipping-document-settings-card:has(.shipping-return-sheet-form) .shipping-document-settings-heading span { display: none; }
  .shipping-document-settings-card:has(.shipping-return-sheet-form) .shipping-document-settings-heading h3 { font-size: 17px; line-height: 1.3; }
  .shipping-return-sheet-form { gap: 6px; }
  .shipping-return-sheet-form label { gap: 2px; }
  .shipping-return-sheet-form p { line-height: 1.35; }
}

#shipping-document-tools {
  width: min(22rem, calc(100vw - 32px));
  box-sizing: border-box;
  margin: auto;
  padding: 16px;
  border: 1px solid #adbbc3;
  border-radius: 8px;
  color: #18314f;
  background: #fff;
}
#shipping-document-tools::backdrop { background: rgb(16 35 55 / 40%); }
#shipping-document-tools header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
#shipping-document-tools h2 { margin: 0; font-size: 18px; }
.shipping-document-tools-list { display: grid; gap: 8px; }
#shipping-document-tools .shipping-document-tools-list :is(a, button) { width: 100%; min-height: 40px; box-sizing: border-box; }
.sales-order-waybill-progress-card[data-waybill-purpose="core_return"] dl:has(> div:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.shipping-plq-setup:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .65rem; font-size: .875rem; }
.shipping-plq-setup > span { flex: 1 1 15rem; overflow-wrap: anywhere; }
.shipping-plq-setup a, .shipping-plq-setup button { white-space: nowrap; }

@media (max-width: 520px), (max-height: 650px) {
  .shipping-document-settings-card:has(#shipping-document-return-method) .shipping-document-settings-heading span { display: none; }
  .shipping-document-settings-card:has(#shipping-document-return-method) .shipping-document-settings-heading h3 { font-size: 17px; line-height: 1.25; }
  .shipping-document-settings-card:has(#shipping-document-return-method) :is(.shipping-document-settings-heading, #shipping-document-settings-content, .form-footer) { padding: 6px 12px; }
  #shipping-document-return-waybill-section .shipping-document-carrier-context { margin: 3px 0; padding-block: 1px; }
  #shipping-document-return-waybill-section .shipping-document-waybill-form { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 4px 6px; }
  #shipping-document-return-waybill-section .shipping-document-waybill-form > * { grid-column: auto; }
  #shipping-document-return-save { align-self: end; }
  #shipping-document-return-waybill-section .shipping-document-waybill-print-row { margin-top: 4px; padding-top: 3px; }
  .shipping-document-settings-card:has(#shipping-document-return-method) .form-footer button { padding: 6px 12px; }
}
#shipping-document-return-waybill-section:has(.shipping-plq-setup:not([hidden])) .shipping-document-waybill-print-row a { display: none; }

#shipping-document-return-waybill-section:has(.shipping-plq-setup:not([hidden])) #shipping-document-return-guidance { display: none; }
@media (max-width: 520px) {
  #shipping-document-return-waybill-section .shipping-document-waybill-form > label:nth-child(3) { grid-column: 1; }
  #shipping-document-return-waybill-section .shipping-document-waybill-form > #shipping-document-return-save { grid-column: 2; grid-row: 2; }
  #shipping-document-return-waybill-section .shipping-document-waybill-print-row > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; }
}

@media (max-width: 360px) {
  #shipping-document-return-waybill-section .shipping-document-waybill-form > label:nth-child(-n+2) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 7em minmax(0, 1fr);
    align-items: center;
  }
  #shipping-document-return-waybill-section .shipping-document-waybill-form > #shipping-document-return-save { grid-row: 3; }
}
