.ops-native-product-reference { width: 100%; height: 100%; overflow: hidden; background: #f2f5f9; }
.ops-native-product-reference > header { display: none; }
.ops-native-product-reference #productReferenceRoot { width: 100%; height: 100%; min-height: 0; }
.product-reference-workspace { display: grid; grid-template-columns: 380px minmax(0, 1fr); width: 100%; height: 100%; min-height: 0; color: var(--za-ink); font: var(--za-type-body); }
.product-reference-sidebar { display: grid; grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto; min-height: 0; padding: 20px 16px 14px; border-right: 1px solid var(--za-line); background: #fff; }
.product-reference-sidebar-head h2 { margin: 0; font: var(--za-type-panel); }
.product-reference-sidebar-head p { margin: 3px 0 14px; color: var(--za-muted); font: var(--za-type-label); }
.product-reference-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.product-reference-filters button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--za-line); border-radius: var(--za-radius-control); color: var(--za-ink); background: var(--za-surface); font: var(--za-type-control); }
.product-reference-filters button strong { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; padding: 2px 7px; border-radius: 9999px; color: var(--za-muted); background: var(--za-neutral-soft); font: 600 .8125rem/1.25rem var(--za-font-sans); }
.product-reference-filters button:hover { border-color: #99c9f1; background: var(--za-blue-soft); }
.product-reference-filters button.active { border-color: var(--za-blue); color: #fff; background: var(--za-blue); }
.product-reference-filters button.active strong { color: var(--za-blue-text); background: #fff; }
.product-reference-search { display: grid; grid-template-columns: minmax(0, 1fr) 42px 42px; gap: 7px; margin-bottom: 10px; }
.product-reference-search label { display: grid; grid-template-rows: auto 42px; gap: 5px; min-width: 0; color: var(--za-muted); font: 600 .875rem/1.375rem var(--za-font-sans); }
.product-reference-search input { width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid var(--za-line-strong); border-radius: var(--za-radius-control); color: var(--za-ink); background: #fff; font: var(--za-type-control); outline: none; }
.product-reference-search button { align-self: end; min-width: 42px; min-height: 42px; padding: 0; border: 1px solid transparent; border-radius: var(--za-radius-control); color: #fff; background: var(--za-blue); font: 600 1.25rem/1 var(--za-font-sans); }
.product-reference-search button.ghost { color: var(--za-ink); border-color: var(--za-line-strong); background: #fff; }
.product-reference-search button:hover { background: var(--za-blue-hover); }
.product-reference-search button.ghost:hover { background: var(--za-neutral-soft); }
.product-reference-search input:focus-visible, .product-reference-search button:focus-visible, .product-reference-filters button:focus-visible, .product-reference-item:focus-visible, .product-reference-pagination button:focus-visible, .product-reference-actions button:focus-visible { outline: 3px solid rgba(0, 117, 222, .22); outline-offset: 2px; }
.product-reference-result-summary { margin: 0; padding: 8px 1px; color: var(--za-muted); font: var(--za-type-caption); }
.product-reference-sync-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 9px 10px; border: 1px solid var(--za-line); border-radius: var(--za-radius-control); color: var(--za-muted); background: var(--za-neutral-soft); font: var(--za-type-caption); }
.product-reference-sync-status strong { color: var(--za-ink); font: 600 .8125rem/1.25rem var(--za-font-sans); }
.product-reference-sync-status span { text-align: right; }
.product-reference-list { min-height: 0; overflow: auto; padding: 2px 4px 10px 0; }
.product-reference-item { display: grid; gap: 7px; width: 100%; margin-bottom: 9px; padding: 13px; border: 1px solid var(--za-line); border-radius: var(--za-radius-card); color: var(--za-ink); background: #fff; text-align: left; box-shadow: none; }
.product-reference-item:hover { border-color: #99c9f1; background: #f8fbff; }
.product-reference-item.selected { border-color: var(--za-blue); background: var(--za-blue-soft); }
.product-reference-item-head, .product-reference-item-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.product-reference-item-head > strong { min-width: 0; font: var(--za-type-list); overflow-wrap: anywhere; }
.product-reference-item-head em, .product-reference-price-status { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 9999px; color: var(--za-blue-text); background: var(--za-blue-soft); font: 600 .8125rem/1.25rem var(--za-font-sans); font-style: normal; white-space: nowrap; }
.product-reference-item-head em.missing, .product-reference-price-status.missing { color: var(--za-warn-text); background: var(--za-warn-soft); }
.product-reference-spec { color: var(--za-ink); font: var(--za-type-body); overflow-wrap: anywhere; }
.product-reference-item-meta { color: var(--za-muted); font: var(--za-type-caption); }
.product-reference-item-meta small { min-width: 0; font: inherit; overflow-wrap: anywhere; }
.product-reference-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--za-line); }
.product-reference-pagination button, .product-reference-actions button { min-height: 40px; padding: 8px 14px; border: 1px solid var(--za-line-strong); border-radius: var(--za-radius-control); color: var(--za-ink); background: #fff; font: 600 .9375rem/1.375rem var(--za-font-sans); }
.product-reference-pagination button:disabled { opacity: .45; }
.product-reference-pagination span { color: var(--za-muted); font: var(--za-type-caption); }
.product-reference-detail { min-width: 0; min-height: 0; overflow: auto; padding: 20px; }
.product-reference-detail-card { display: grid; gap: 16px; max-width: 1040px; margin: 0 auto; padding-bottom: 72px; }
.product-reference-detail-head, .product-reference-identity, #productReferenceForm { border: 1px solid var(--za-line); border-radius: var(--za-radius-card); background: #fff; box-shadow: none; }
.product-reference-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px; }
.product-reference-detail-head h2 { margin: 5px 0 4px; font: var(--za-type-record); outline: none; }
.product-reference-detail-head p { max-width: 760px; margin: 0; color: var(--za-muted); font: var(--za-type-label); overflow-wrap: anywhere; }
.product-reference-detail-head .eyebrow { color: var(--za-blue-text); font: 700 .8125rem/1.25rem var(--za-font-sans); letter-spacing: .08em; }
.product-reference-completeness { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 13px 15px; border: 1px solid #f2c36c; border-radius: var(--za-radius-control); color: var(--za-warn-text); background: var(--za-warn-soft); font: var(--za-type-label); }
.product-reference-completeness strong { margin-right: 2px; }
.product-reference-completeness span { padding: 3px 9px; border-radius: 9999px; background: rgba(255, 255, 255, .72); }
.product-reference-identity { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.product-reference-identity > div { min-width: 0; padding: 16px; border-right: 1px solid var(--za-line); }
.product-reference-identity > div:last-child { border-right: 0; }
.product-reference-identity span { display: block; color: var(--za-muted); font: var(--za-type-label); }
.product-reference-identity strong { display: block; margin-top: 6px; font: 600 .9375rem/1.5rem var(--za-font-sans); overflow-wrap: anywhere; }
#productReferenceForm { display: grid; gap: 18px; padding: 20px; }
.product-reference-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr); gap: 14px; }
.product-reference-form-grid label { display: grid; gap: 7px; min-width: 0; color: var(--za-ink); font: 600 .875rem/1.375rem var(--za-font-sans); }
.product-reference-form-grid label.wide { grid-column: 1 / -1; }
.product-reference-form-grid label.key-field { padding: 11px; border: 1px solid #f2c36c; border-radius: var(--za-radius-control); color: #69451b; background: #fff8e7; }
.product-reference-form-grid input, .product-reference-form-grid textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--za-line-strong); border-radius: var(--za-radius-control); color: var(--za-ink); background: #fff; font: var(--za-type-control); outline: none; }
.product-reference-form-grid textarea { min-height: 112px; resize: vertical; font: var(--za-type-body); }
.product-reference-form-grid input:focus, .product-reference-form-grid textarea:focus { border-color: var(--za-blue); box-shadow: var(--za-focus); }
.product-reference-storefront { display: grid; gap: 14px; padding: 17px; border: 1px solid var(--za-line); border-radius: var(--za-radius-card); background: #f8fafc; }
.product-reference-storefront > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.product-reference-storefront h3 { margin: 3px 0 2px; font: var(--za-type-card); }
.product-reference-storefront header p { margin: 0; color: var(--za-muted); font: var(--za-type-label); }
.product-reference-storefront header a, .product-reference-link-missing { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 38px; padding: 7px 11px; border: 1px solid var(--za-line-strong); border-radius: var(--za-radius-control); color: var(--za-blue-text); background: #fff; font: var(--za-type-label); text-decoration: none; }
.product-reference-storefront header a:hover { border-color: #99c9f1; background: var(--za-blue-soft); }
.product-reference-link-missing { color: var(--za-warn-text); border-color: #f2c36c; background: var(--za-warn-soft); }
.product-reference-sync-toggle { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #b9d9f5; border-radius: var(--za-radius-control); background: var(--za-blue-soft); cursor: pointer; }
.product-reference-sync-toggle input { width: 18px; height: 18px; accent-color: var(--za-blue); }
.product-reference-sync-toggle span { display: grid; gap: 1px; }
.product-reference-sync-toggle strong { font: var(--za-type-control); }
.product-reference-sync-toggle small { color: var(--za-muted); font: var(--za-type-caption); }
.product-reference-storefront-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.product-reference-storefront-grid label { display: grid; gap: 7px; color: var(--za-ink); font: 600 .875rem/1.375rem var(--za-font-sans); }
.product-reference-storefront-grid input, .product-reference-storefront-grid textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--za-line-strong); border-radius: var(--za-radius-control); color: var(--za-ink); background: #fff; font: var(--za-type-control); outline: none; }
.product-reference-storefront-grid textarea { min-height: 150px; resize: vertical; font: var(--za-type-body); }
.product-reference-storefront-grid input:focus, .product-reference-storefront-grid textarea:focus { border-color: var(--za-blue); box-shadow: var(--za-focus); }
.product-reference-storefront.is-auto [data-storefront-field] { color: #475467; background: #eef2f6; cursor: default; }
.product-reference-storefront-meta { margin: 0; color: var(--za-muted); font: var(--za-type-caption); }
.product-reference-boundary { padding: 15px 16px; border: 1px solid #f2c36c; border-radius: var(--za-radius-control); color: #69451b; background: #fff8e7; }
.product-reference-boundary strong { display: block; font: 600 1rem/1.5rem var(--za-font-sans); }
.product-reference-boundary p { margin: 4px 0 0; font: var(--za-type-body); }
.product-reference-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 4px; }
.product-reference-actions span { color: var(--za-muted); font: var(--za-type-caption); }
.product-reference-actions button { color: #fff; border-color: var(--za-blue); background: var(--za-blue); }
.product-reference-actions button:hover { border-color: var(--za-blue-hover); background: var(--za-blue-hover); }
.product-reference-empty { display: grid; place-content: center; min-height: 180px; padding: 24px; border: 1px dashed var(--za-line-strong); border-radius: var(--za-radius-card); color: var(--za-muted); background: #fff; text-align: center; }
.product-reference-empty strong { color: var(--za-ink); font: var(--za-type-card); }
.product-reference-empty p { margin: 5px 0 0; font: var(--za-type-body); }
.product-reference-empty.detail-empty { min-height: 320px; }
@media (max-width: 1040px) {
  .product-reference-workspace { grid-template-columns: 340px minmax(0, 1fr); }
  .product-reference-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-reference-identity > div:nth-child(2) { border-right: 0; }
  .product-reference-identity > div:nth-child(-n+2) { border-bottom: 1px solid var(--za-line); }
  .product-reference-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ops-native-product-reference { overflow: auto; }
  .product-reference-workspace { grid-template-columns: 1fr; height: auto; min-height: 100%; }
  .product-reference-sidebar { grid-template-rows: auto auto auto auto auto auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--za-line); }
  .product-reference-list { max-height: 420px; }
  .product-reference-detail { overflow: visible; padding: 16px; }
  .product-reference-detail-head { display: grid; }
  .product-reference-storefront > header { display: grid; }
  .product-reference-identity { grid-template-columns: 1fr; }
  .product-reference-identity > div { border-right: 0; border-bottom: 1px solid var(--za-line); }
  .product-reference-identity > div:last-child { border-bottom: 0; }
  .product-reference-actions { align-items: stretch; flex-direction: column; }
  .product-reference-actions button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .product-reference-item, .product-reference-filters button, .product-reference-actions button { transition: none !important; }
}
