* { 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 {
  --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; }
.app-boot { align-items: center; justify-content: center; background: #f0f2f5; }
.app-boot-content { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #1a1a2e; }
.app-boot-content strong { font-size: 22px; letter-spacing: 0; }
.app-boot-spinner { width: 24px; height: 24px; border: 3px solid #d7deea; border-top-color: #4f8ef7; 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: #4f8ef7; border-color: #4f8ef7; 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: #1a1a2e; 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-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  { 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: #1a1a2e; 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: #4f8ef7; color: #fff; font-weight: 700; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.app-update-banner button:hover { background: #3a7ae0; }
.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: #1a1a2e; align-items: center; justify-content: center; }
.reg-card { background: #fff; border-radius: 18px; padding: 32px 32px 24px; width: 100%; max-width: 400px; margin: 20px; 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; }
.sales-pricing-card { max-width: 1480px; width: calc(100vw - 20px); }
.sales-pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sales-pricing-grid .form-row { margin-bottom: 0; }
.sales-pricing-help { font-size: 12px; color: #667085; line-height: 1.6; margin: 4px 0 12px; }
.sales-pricing-manufacturing-cost { min-height: 20px; display: flex; align-items: baseline; gap: 8px; margin: -6px 0 10px; color: #667085; font-size: 11px; line-height: 1.4; }
.sales-pricing-manufacturing-cost strong { color: #1a1a2e; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sales-pricing-manufacturing-cost small { color: #8a94a6; font-size: 10px; }
.sales-pricing-manufacturing-cost-cell .price-value { color: #1a1a2e; font-size: 13px; }
.sales-pricing-field-help { font-size: 11px; color: #8a94a6; line-height: 1.45; margin-top: 4px; }
.sales-base-reference { font-size: 11px; color: #667085; line-height: 1.45; margin-top: 5px; }
.sales-base-reference strong { color: #1a1a2e; }
.sales-pricing-preview { margin-top: 14px; border-top: 1px solid #edf0f5; padding-top: 12px; }
.sales-pricing-preview-title { font-size: 13px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.sales-rank-table-wrap { width: 100%; overflow-x: hidden; padding-bottom: 2px; }
.sales-rank-table { width: 100%; min-width: 0; table-layout: fixed; }
.sales-rank-table th, .sales-rank-table td { white-space: normal; word-break: keep-all; }
.sales-rank-table th:nth-child(1), .sales-rank-table td:nth-child(1) { width: 20%; }
.sales-rank-table th:nth-child(2), .sales-rank-table td:nth-child(2) { width: 15%; }
.sales-rank-table th:nth-child(3), .sales-rank-table td:nth-child(3) { width: 8%; text-align: right; }
.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: 13%; }
.sales-rank-table th:nth-child(6), .sales-rank-table td:nth-child(6) { width: 12%; }
.sales-rank-table th:nth-child(7), .sales-rank-table td:nth-child(7) { width: 13%; }
.sales-rank-table .form-input { min-width: 0; padding: 7px 8px; }
.sales-rank-price { white-space: nowrap; }
.sales-pricing-error { color: #e24b4a; font-size: 12px; min-height: 18px; margin-top: 10px; }
@media(max-width:640px){ .sales-pricing-card { width: calc(100vw - 10px); padding: 18px 10px; } .sales-pricing-grid { grid-template-columns: 1fr; } .sales-rank-table { font-size: 11px; } .sales-rank-table th, .sales-rank-table td { padding: 7px 5px; } }

/* 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-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-run-now-button { min-height: 34px; padding: 7px 16px; }
.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: minmax(0, 1fr) auto; align-items: start; } .ec-research-operation-left .rakuten-note { flex-basis: 100%; } }
.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: 104px; 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: 80px; min-width: 80px; 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(4, 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; }
.catalog-illustration-empty { color: #667085; }
.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-catalog-head-layout { grid-template-columns: 1fr; } .component-catalog-target .component-target-summary { grid-template-columns: repeat(4, minmax(0, 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 .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: #4f8ef7; }
.btn-primary    { background: #4f8ef7; 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: #3a7ae0; }
.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; }
.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; }
#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(660px, 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-config-panel { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(420px, 1.25fr); 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-addition-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; align-items: end; }
.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.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 { 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-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(5, 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 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%; overflow-x: auto; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); background: #fff; }
.manufacturing-cost-table { min-width: 1160px; table-layout: fixed; box-shadow: none; border-radius: 0; }
.manufacturing-cost-table th:nth-child(1), .manufacturing-cost-table td:nth-child(1) { width: 22%; }
.manufacturing-cost-table th:nth-child(2), .manufacturing-cost-table td:nth-child(2) { width: 9%; text-align: right; }
.manufacturing-cost-table th:nth-child(3), .manufacturing-cost-table td:nth-child(3) { width: 11%; text-align: right; }
.manufacturing-cost-table th:nth-child(4), .manufacturing-cost-table td:nth-child(4) { width: 10%; text-align: right; }
.manufacturing-cost-table th:nth-child(5), .manufacturing-cost-table td:nth-child(5) { width: 11%; text-align: right; }
.manufacturing-cost-table th:nth-child(6), .manufacturing-cost-table td:nth-child(6) { width: 10%; text-align: right; }
.manufacturing-cost-table th:nth-child(7), .manufacturing-cost-table td:nth-child(7) { width: 11%; text-align: right; }
.manufacturing-cost-table th:nth-child(8), .manufacturing-cost-table td:nth-child(8) { 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; align-items: center; gap: 4px; 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-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: 220px; overflow: auto; padding-right: 2px; }
.manufacturing-cost-component-header, .manufacturing-cost-component-card { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(170px, 1.4fr) 92px 58px 72px 104px; align-items: center; gap: 6px; min-width: 820px; }
.manufacturing-cost-component-header { position: sticky; top: 0; z-index: 1; padding: 5px 8px; border: 1px solid #e2e8f0; border-radius: 7px; background: #eef4ff; color: #667085; font-size: 10px; font-weight: 900; }
.manufacturing-cost-component-card { border: 1px solid #e4e9f1; border-radius: 7px; background: #fff; padding: 5px 8px; font-size: 11px; }
.manufacturing-cost-component-card.missing-unit { background: #fffaf0; border-color: #fedf89; }
.manufacturing-cost-component-title { color: #1a1a2e; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.manufacturing-cost-component-part { 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: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)); }
}
@media(max-width:560px){
  .manufacturing-cost-toolbar, .manufacturing-cost-listbar, .manufacturing-cost-summary { grid-template-columns: 1fr; }
  .manufacturing-cost-query-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .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-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-table { min-width: 1080px; }
  .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-priority-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-priority-badge.high { background: #fde7e4; color: #a62e23; }
.core-priority-badge.normal { background: #fff2c9; color: #725400; }
.core-priority-badge.low { background: #edf0f4; color: #536070; }
.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 span { 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-status { color: #176b3a; font-weight: 700; }
#ccf-product-candidates { max-height: 300px; overflow-y: auto; }
#ccf-product-candidates .candidate-empty { display: grid; gap: 3px; padding: 12px; color: #667085; font-size: 12px; }
#ccf-product-candidates .candidate-empty strong { color: #a33a2f; font-size: 13px; }
#ccf-product-candidates .candidate-item:disabled { cursor: default; background: #f7f8fa; opacity: 1; }
.core-collection-candidate-item small { display: block; margin-top: 4px; color: #667085; line-height: 1.45; }
.core-collection-candidate-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.core-collection-candidate-head strong { min-width: 0; color: #172033; font-family: monospace; font-size: 14px; overflow-wrap: anywhere; }
.core-collection-master-badge { flex: none; display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.core-collection-master-badge.master { background: #e7f6ed; color: #176b3a; }
.core-collection-master-badge.missing { background: #fff0ee; color: #a33a2f; }
.core-collection-master-badge.existing { background: #eaf2ff; color: #245fa8; }
@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; }
.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; }
  .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; }
.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-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-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; }
@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-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-category-toolbar { align-items: flex-start; flex-direction: column; }
  .customer-category-grid { grid-template-columns: 1fr 1fr; }
}

/* 送料マスタ */
#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-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 .btn-primary { width: 100%; }
  .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; }
.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; word-break: break-all; }
.ac-part-value-with-action { justify-content: space-between; gap: 8px; padding: 5px 4px; }
.ac-part-value-text { min-width: 0; 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 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  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-note {
  flex: 0 0 auto;
  margin-top: 5px;
  padding: 5px 9px;
  border: 1px solid #ffd9d6;
  border-radius: 999px;
  background: #fff7f6;
  color: #7f3f3b;
  font-size: 11px;
  font-weight: 700;
}
.product-form-required-note span { color: #d43f35; }
.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-core-grid { margin-top: 12px; }
.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: 18px;
  margin: 0 20px;
  padding: 0 2px;
  font-size: 12px;
}
.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;
}
@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, .product-form-required-note { 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-error { margin: 0 12px; }
  .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:680px) and (min-width:961px) {
  .product-form-header { padding-top: 12px; padding-bottom: 10px; }
  .product-form-layout { padding-top: 10px; }
  .product-form-section { padding: 11px; }
  .product-form-section-head { margin-bottom: 8px; }
  .product-form-basic-grid, .product-form-spec-grid { gap: 7px 10px; }
  .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; }
.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; }
.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: #1a1a2e; 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-logo h1 { font-size: 30px; font-weight: 800; color: #1a1a2e; letter-spacing: .1em; }
.login-logo p  { font-size: 11px; color: #aaa; margin-top: 5px; }
.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: #4f8ef7; }
.btn-login  { width: 100%; background: #4f8ef7; color: #fff; border: none; border-radius: 8px; padding: 12px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 4px; }
.btn-login:hover    { background: #3a7ae0; }
.btn-login:disabled { opacity: 0.6; pointer-events: none; }
.login-error { color: #e24b4a; font-size: 12px; margin-top: 10px; text-align: center; min-height: 18px; }

/* =============================================
   メニュー画面
============================================= */
.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: #173d34; }
.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; }
@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-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(180px, 1fr) minmax(150px, .55fr) 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 .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-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-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 { 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-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 span { display: block; margin-top: 4px; overflow-wrap: anywhere; color: #6e7974; font-size: 10px; }
.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-search-form { grid-template-columns: minmax(0, 1fr) auto; }
  .customer-catalog-search-form select { grid-column: 1 / -1; 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; }
.badge-img { background: #e8f7ee; color: #1a8c3e; border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.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 #e0e0e0; padding: 10px 16px; flex-shrink: 0; }
.search-row    { display: flex; gap: 8px; align-items: center; }
.search-input  { flex: 1; min-width: 0; border: 1px solid #d0d0d0; border-radius: 8px; padding: 8px 12px; font-size: 14px; outline: none; }
.search-input:focus { border-color: #4f8ef7; }
.btn-search { border: none; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; font-weight: 600; white-space: nowrap; flex-shrink: 0; background: #4f8ef7; color: #fff; }
.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: 8px; padding: 8px 16px; background: #fff; border-bottom: 1px solid #e8e8e8; flex-shrink: 0; }
.filter-row label { color: #667085; font-size: 11px; font-weight: 700; white-space: nowrap; }
.filter-row .form-select { min-width: 0; min-height: 34px; padding: 6px 32px 6px 10px; font-size: 13px; }
.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: #4f8ef7; color: #fff; border-color: #4f8ef7; }
.count-bar  { padding: 6px 16px; font-size: 12px; 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: #4f8ef7; background: #f0f6ff; }
.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 span { 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 { font-size: 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-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; }
@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 .list { padding: 7px; }
#screen-search .card { margin-bottom: 6px; border-radius: 7px; padding: 9px 10px; }
#screen-search .card.selected { border-color: #91b9f5; box-shadow: inset 3px 0 0 #326fd1; }
#screen-search .card-media { width: 48px; }
#screen-search .card-thumb { width: 48px; height: 48px; border-radius: 6px; }
#screen-search .card-pn-primary { margin-top: 0; color: #172033; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
#screen-search .card-name { margin-top: 3px; color: #526173; font-size: 11px; font-weight: 700; }
#screen-search .card-mfr { color: #667085; font-size: 11px; }
#screen-search .product-kind-list.compact { margin-top: 5px; }
#screen-search .panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  background: #fff;
}
#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: 18px 20px 14px;
  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: 13px; font-weight: 800; }
.sales-product-maker { 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: 23px;
  border: 1px solid #d0d5dd;
  border-radius: 5px;
  padding: 3px 7px;
  background: #f8fafc;
  color: #475467;
  font-size: 10px;
  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: 2;
  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: 16px 18px 24px; }
.sales-detail-tab-panel[hidden] { display: none !important; }
.sales-detail-table-state { min-height: 64px; overflow: auto; }
.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(auto-fill, minmax(132px, 1fr));
  gap: 10px !important;
}
.sales-detail-image-grid .panel-right-empty { grid-column: 1 / -1; min-height: 92px; }
.sales-detail-image-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 {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 0;
  align-self: stretch;
  display: block;
  width: 340px;
  max-height: none;
  height: 100%;
  overflow-y: auto;
  padding: 16px;
  border-left: 1px solid #d8e0ea;
  background: #f7f9fc;
  scrollbar-gutter: stable;
}
.sales-conditions-title { margin-bottom: 12px; color: #172033; font-size: 14px; font-weight: 800; }
#screen-search .sales-conditions-panel .detail-customer-section { margin: 0 0 12px; }
#screen-search .sales-conditions-panel .detail-customer-panel { border: 0; border-radius: 0; padding: 0 0 12px; background: transparent; }
#screen-search .sales-conditions-panel .detail-customer-head { display: grid; gap: 5px; margin-bottom: 10px; }
#screen-search .sales-conditions-panel .detail-customer-head label,
#screen-search .sales-conditions-panel .detail-customer-head > span { color: #667085; font-size: 11px; font-weight: 700; }
#screen-search .sales-conditions-panel .detail-customer-head.static { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; }
#screen-search .sales-conditions-panel .detail-customer-head.static strong { color: #172033; font-size: 13px; overflow-wrap: anywhere; }
#screen-search .sales-conditions-panel .detail-customer-select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-color: #b8c4d4;
  border-radius: 6px;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}
.detail-customer-price-focus { border-top: 1px solid #d9e1eb; padding-top: 11px; }
.detail-customer-price-focus > span { display: block; color: #667085; font-size: 11px; font-weight: 700; }
.detail-customer-price-focus > strong {
  display: block;
  margin-top: 3px;
  color: #15703a;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.detail-customer-price-focus.empty > strong { color: #667085; font-size: 15px; line-height: 1.4; }
.detail-customer-price-focus > small { display: block; margin-top: 4px; color: #667085; font-size: 10px; }
.detail-customer-price-focus:not(.empty) > strong { text-align: right; white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.detail-customer-price-focus:not(.empty) > small { text-align: right; }
#screen-search .sales-conditions-terms {
  width: 100%;
  border-color: #d9e1eb;
  border-radius: 6px;
  padding: 7px;
  background: #fff;
}
#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: 110px minmax(0, 1fr);
}
#screen-search .sales-shipping-estimate {
  margin-top: 12px;
  border-top: 1px solid #d9e1eb;
  padding-top: 12px;
}
#screen-search .sales-shipping-estimate > .detail-block-title { margin-bottom: 8px; color: #344054; font-size: 12px; }
.sales-shipping-profile {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 30px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5eaf0;
  padding-bottom: 7px;
}
.sales-shipping-profile > span { color: #667085; font-size: 11px; font-weight: 700; }
.sales-shipping-profile > strong {
  min-width: 0;
  color: #172033;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.sales-shipping-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.sales-shipping-controls label { display: grid; min-width: 0; gap: 3px; }
.sales-shipping-controls label > span { color: #667085; font-size: 10px; font-weight: 700; }
.sales-shipping-controls select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid #b8c4d4;
  border-radius: 5px;
  padding: 5px 24px 5px 7px;
  background: #fff;
  color: #172033;
  font-family: inherit;
  font-size: 11px;
}
.sales-shipping-size-control { grid-column: 1 / -1; }
.sales-shipping-message {
  margin: 7px 0;
  border-left: 3px solid #8ba3bd;
  padding: 6px 8px;
  background: #eef4fa;
  color: #526173;
  font-size: 10px;
  line-height: 1.45;
}
.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;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin-top: 9px;
  border-top: 1px solid #d9e1eb;
  padding-top: 9px;
}
.sales-shipping-result > span { color: #667085; font-size: 11px; font-weight: 700; }
.sales-shipping-result > div { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.sales-shipping-result .shipping-rate-fee { color: #15703a; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sales-shipping-result.pending { display: block; min-height: 0; color: #98a2b3; font-size: 10px; }
.sales-shipping-island {
  display: grid;
  gap: 4px;
  margin-top: 7px;
  padding: 7px 8px;
  background: #fff;
  color: #667085;
  font-size: 10px;
  line-height: 1.45;
}
.sales-shipping-island > span { min-width: 0; overflow-wrap: anywhere; }
.sales-shipping-island .shipping-rate-fee { color: #344054; font-size: 11px; font-weight: 800; white-space: nowrap; }
.sales-shipping-island .shipping-rate-tax-label { margin-left: 4px; }
#screen-search .sales-conditions-market {
  min-height: 0;
  margin-top: 12px;
  border: 0;
  border-top: 1px solid #d9e1eb;
  border-radius: 0;
  padding: 12px 0 0;
  background: transparent;
}
#screen-search .sales-conditions-market .detail-block-title { color: #344054; font-size: 12px; }
#screen-search .sales-conditions-market .ec-mall-detail-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 6px; }
#screen-search .sales-conditions-market .ec-mall-detail-price { font-variant-numeric: tabular-nums; }

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

@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;
    width: auto;
    height: auto;
    overflow: visible;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid #d8e0ea;
    border-left: 0;
    padding: 14px;
  }
  #screen-search .panel-left { grid-column: 1; grid-row: 3; overflow: visible; }
  .sales-shipping-controls { grid-template-columns: repeat(2, 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: 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 { grid-template-columns: 1fr; }
  .sales-shipping-size-control { grid-column: auto; }
}
.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(320px, 390px) minmax(0, 1fr); overflow: hidden; background: #f0f2f5; }
.production-left { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid #e0e0e0; background: #f6f7f9; }
.production-search { padding: 12px 14px; background: #fff; border-bottom: 1px solid #e8e8e8; }
.production-category-filter { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 8px; }
.production-category-filter label { font-size: 11px; font-weight: 700; color: #667085; white-space: nowrap; }
.production-category-filter .form-select { min-height: 32px; font-size: 13px; }
.production-ranking-tools { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.production-ranking-tools .form-select { width: 100%; min-width: 0; }
.production-filter-row { display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px; background: #fff; border-bottom: 1px solid #eee; }
.production-count { padding: 8px 14px; font-size: 12px; color: #778; background: #f6f7f9; border-bottom: 1px solid #eee; }
.production-list { flex: 1; overflow-y: auto; padding: 8px; }
.production-load-more-wrap { padding: 0 8px 10px; background: #f6f7f9; }
.production-card { background: #fff; border: 1px solid #e7e9ee; border-radius: 8px; padding: 10px 11px; margin-bottom: 8px; cursor: pointer; display: grid; gap: 5px; }
.production-card:hover, .production-card.selected { border-color: #4f8ef7; box-shadow: 0 2px 10px rgba(79,142,247,.12); }
.production-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.production-rank { font-size: 13px; font-weight: 800; color: #1a1a2e; }
.production-status { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; 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: 13px; font-weight: 700; color: #111a33; word-break: break-all; }
.production-sub-number { font-size: 11px; color: #64748b; line-height: 1.25; word-break: break-all; }
.production-meta { font-size: 11px; 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, 58px); flex: 0 0 120px; 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 { min-width: 0; overflow-y: auto; background: #fff; }
.production-panel-topbar { position: sticky; top: 0; z-index: 2; background: #fff; }
.production-detail { max-width: 980px; padding: 18px 20px 28px; }
.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; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eee; padding-bottom: 12px; margin-bottom: 12px; }
.production-head-main { min-width: 0; flex: 1 1 auto; }
.production-detail-title { font-size: 18px; font-weight: 800; color: #1a1a2e; }
.production-detail-sub { font-size: 12px; color: #7c8492; margin-top: 4px; }
.production-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.production-image-panel { margin-top: 9px; max-width: 560px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; align-items: center; }
.production-image-title { font-size: 11px; font-weight: 700; color: #667085; white-space: nowrap; }
.production-image-count { font-size: 11px; color: #8a93a3; min-width: 0; }
.production-image-strip { grid-column: 1 / -1; display: flex; gap: 6px; overflow-x: auto; min-height: 48px; padding: 1px 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-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.production-section { border: 1px solid #edf0f4; border-radius: 8px; padding: 12px; background: #fff; }
.production-section h3 { font-size: 13px; color: #556070; margin-bottom: 8px; }
.production-mobile-stock { display: none; }
.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: 13px; 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: 12px; line-height: 1.55; color: #1a1a2e; background: #fafbfc; border: 1px solid #edf0f4; border-radius: 8px; padding: 10px; }
.production-mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.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 { border: 1px solid #d7dce5; border-radius: 6px; padding: 7px 8px; font-size: 13px; min-width: 0; }
.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: 11px; line-height: 1.5; margin-top: 6px; }
.production-action-secondary { background: #f8fafc; color: #344054; border-color: #d7dce5; }
.production-action-secondary:hover { background: #eef2f7; }
.core-qty-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 10px; }
.core-qty-card { border: 1px solid #dbe7ff; background: #f6f9ff; border-radius: 8px; padding: 10px 12px; }
.core-qty-card.rebuilt { border-color: var(--kind-rebuilt-border); background: var(--kind-rebuilt-bg); }
.core-qty-card.aftermarket_new { border-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: 22px; color: #174ea6; font-weight: 800; line-height: 1.1; }
.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: 11px; color: #7c8492; margin-top: 4px; 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(960px, 100%); margin: auto; border: 1px solid #dce5ef; border-radius: 16px; padding: 28px; background: linear-gradient(145deg, #fff, #f6f9fd); box-shadow: 0 12px 34px rgba(27, 52, 85, .08); }
.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(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.finished-label-mode-card { display: flex; align-items: flex-start; flex-direction: column; min-height: 210px; border: 1px solid #d8e1ec; border-radius: 14px; padding: 22px; 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: linear-gradient(145deg, #fff, #f5f9ff); }
.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-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-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-toolbar .finished-label-print-action { min-height: 36px; padding: 8px 15px; font-size: 15px; font-weight: 900; line-height: 1.1; }
.finished-label-selected { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.finished-label-selected-cell { 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; word-break: break-word; }
.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 { font-family: Consolas, "SFMono-Regular", monospace; white-space: nowrap; }
.finished-label-history-sub { font-size: 11px; color: #7c8492; margin-top: 4px; line-height: 1.45; word-break: break-word; }
.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-top: 5px; color: #173f2a; font-family: Consolas, "SFMono-Regular", monospace; font-size: 11px; 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; }
@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 .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-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 { grid-template-columns: repeat(5, minmax(0, 1fr)); 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-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-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-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-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: 620px; }
.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.shipped { background: #eaf2ff; color: #174ea6; }
.finished-shipment-status.cancelled { background: #f2f3f5; color: #666f7d; }
.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-history { display: flex; flex-direction: column; gap: 9px; }
.finished-shipment-history-row { border: 1px solid #e3e8ef; border-radius: 8px; padding: 10px; background: #fff; }
.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-history-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
@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 { padding: 12px 10px 24px; scroll-margin-top: 8px; }
  .production-detail-head { flex-direction: column; }
  .production-actions { justify-content: flex-start; }
  .production-image-panel { max-width: 100%; width: 100%; }
  .production-mobile-stock { display: block; margin-bottom: 10px; }
  .production-mobile-stock .core-qty-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 0; }
  .production-mobile-stock .core-qty-card { padding: 8px 7px; }
  .production-mobile-stock .core-qty-label { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .production-mobile-stock .core-qty-value { font-size: 20px; }
  .production-mobile-stock .core-qty-sub { display: none; }
  .production-core-section .core-qty-summary { display: none; }
  .production-grid { grid-template-columns: 1fr; }
  .core-qty-summary { grid-template-columns: 1fr; }
  .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-selected, .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-lookup-grid { grid-template-columns: 1fr; }
  .finished-shipment-submit-row { align-items: stretch; flex-direction: column; }
}

/* =============================================
   フルスクリーンギャラリー
============================================= */
.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; }
.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 .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-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(220px, 0.8fr) minmax(420px, 1.4fr); }
.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; }
.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; }
.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; }
}
@media (max-width: 560px) {
  .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-permission-overview-head { align-items: flex-start; flex-direction: column; }
  .user-permission-toolbar { align-items: stretch; flex-direction: column; }
  .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; overflow: hidden; }
  #screen-search .app-body { display: flex; flex-direction: row; flex: 1; overflow: hidden; }
  #screen-search .left-col { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; height: 100%; border-right: 1px solid #e0e0e0; background: #f0f2f5; overflow: hidden; }
  #screen-search .right-col { flex: 1; display: flex; flex-direction: column; height: 100%; background: #fff; min-width: 0; overflow: hidden; }
  #screen-search .overlay { display: none !important; }
  #screen-search .panel { position: static; height: 100%; 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: 100%; }
}

/* 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; }

@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; }
}
