/* Product Master: approved compact list/details composition. All sizes are scoped. */
#page-product-master .page-head { padding: 8px 12px !important; margin-bottom: 12px; border-radius: 14px; }
#page-product-master .page-head h1 { margin: 0 0 3px; font-size: 19px !important; line-height: 1.2 !important; }
#page-product-master .page-head p { margin: 0; font-size: 12px; line-height: 1.4; }
#page-product-master .page-head .primary { min-height: 36px; padding: 8px 15px; font-size: 12px; }
#page-product-master .product-master-workspace { display: grid; grid-template-columns: minmax(0, 7fr) minmax(310px, 3fr); gap: 12px; align-items: stretch; height: var(--pm-workspace-height, calc(100dvh - 220px)); min-height: 0; }
#page-product-master .product-master-workspace.pm-details-closed { grid-template-columns: minmax(0, 1fr); }
#page-product-master .product-master-panel { display: flex; flex-direction: column; gap: 10px; padding: 12px !important; min-width: 0; min-height: 0; margin: 0; border-radius: 12px; overflow: hidden; }
#page-product-master .product-master-filters.filters { flex: 0 0 auto; grid-template-columns: minmax(170px, 1fr) 110px 120px auto auto; gap: 8px; margin: 0; }
#page-product-master .product-master-filters > * { min-width: 0; }
#page-product-master .product-master-filters button,
#page-product-master .product-master-filters input,
#page-product-master .product-master-filters select { box-sizing: border-box; min-height: 32px !important; height: 32px; padding: 6px 9px; font-size: 11px !important; line-height: 1.25; border-radius: 8px; }
#page-product-master .product-master-filters input,
#page-product-master .product-master-filters select { width: 100%; }
#page-product-master .product-master-filters button { white-space: nowrap; box-shadow: none; }
#page-product-master .product-master-filters button svg { width: 16px; height: 16px; }
#page-product-master .product-master-table-wrap { flex: 1 1 auto; min-height: 0; max-height: none; border: 0; border-radius: 7px; overflow: auto; scrollbar-width: thin; }
#page-product-master table.product-master-table { min-width: 535px; width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
#page-product-master .product-master-table th { position: sticky; top: 0; z-index: 1; background: #fafaff; white-space: nowrap; font-size: 10px !important; line-height: 1.2; padding: 8px 7px !important; border-bottom: 1px solid var(--line); }
#page-product-master .product-master-table th:first-child { width: 39%; }
#page-product-master .product-master-table th:nth-child(2) { width: 20%; }
#page-product-master .product-master-table th:nth-child(3) { width: 10%; }
#page-product-master .product-master-table th:nth-child(4) { width: 17%; }
#page-product-master .product-master-table th:nth-child(5) { width: 14%; }
#page-product-master .product-master-table td { padding: 3px 7px !important; vertical-align: middle; font-size: 11px; line-height: 1.25; overflow-wrap: normal; word-break: normal; border-bottom: 1px solid var(--line); }
#page-product-master .product-master-table tr.pm-selected td { background: #f0ebff; border-top: 1px solid #a98cff; border-bottom: 1px solid #a98cff; }
#page-product-master .product-master-table tr.pm-selected td:first-child { border-left: 1px solid #a98cff; border-radius: 7px 0 0 7px; }
#page-product-master .product-master-table tr.pm-selected td:last-child { border-right: 1px solid #a98cff; border-radius: 0 7px 7px 0; }
#page-product-master .product-master-table tbody tr:hover td { background: #f5f2ff; }
#page-product-master .pm-product-select { display: flex; gap: 9px; align-items: center; width: 100%; min-width: 0; min-height: 30px; padding: 0; background: transparent; border: 0; border-radius: 5px; box-shadow: none; color: inherit; text-align: left; font: inherit; cursor: pointer; }
#page-product-master .pm-product-select:focus-visible { outline: 2px solid var(--violet, #5b2df5); outline-offset: 1px; }
#page-product-master .pm-product-name { min-width: 0; }
#page-product-master .pm-product-name b { display: block; font-size: 11px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-product-master .pm-product-name small { margin-top: 2px; font-size: 10px; line-height: 1.2; }
#page-product-master .pm-image { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 30px; border-radius: 6px; background: #eeedf9; overflow: hidden; }
#page-product-master .pm-image img { width: 100%; height: 100%; object-fit: contain; }
#page-product-master .pm-image-fallback { font-size: 10px; font-weight: 700; color: #6352a0; }
#page-product-master .pm-image-fallback[hidden], #page-product-master img[hidden], #page-product-master .product-master-details[hidden] { display: none; }
#page-product-master .pm-sku { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
#page-product-master .pm-number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#page-product-master .pill { white-space: nowrap; padding: 3px 8px; font-size: 10px; line-height: 1.2; border-radius: 10px; }
#page-product-master .product-master-pagination { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.3; }
#page-product-master .pm-page-buttons { display: flex; align-items: center; gap: 7px; margin-left: auto; white-space: nowrap; }
#page-product-master .pm-page-buttons button { min-height: 28px; height: 28px; padding: 5px 9px; font-size: 10px; box-shadow: none; border-radius: 7px; }
#page-product-master .product-master-details { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; padding: 12px !important; margin: 0; border-radius: 12px; overflow: hidden; }
#page-product-master .product-master-details header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
#page-product-master .product-master-details h2 { font-size: 15px !important; line-height: 1.2; margin: 0; }
#page-product-master .product-master-details header .icon-button { min-width: 24px; min-height: 24px; width: 24px; height: 24px; padding: 3px; background: transparent; border: 0; box-shadow: none; }
#page-product-master .product-master-details header svg { width: 16px; height: 16px; }
#page-product-master .pm-detail-body { display: flex; flex-direction: column; flex: 1 1 auto; gap: 4px; min-height: 0; overflow: auto; scrollbar-width: thin; }
#page-product-master .pm-detail-identity { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
#page-product-master .pm-detail-identity > div { min-width: 0; }
#page-product-master .pm-detail-identity h3 { font-size: 14px !important; line-height: 1.2 !important; margin: 0 0 3px; overflow-wrap: anywhere; }
#page-product-master .pm-detail-identity p { margin: 0 0 6px; color: var(--muted); font-size: 11px; line-height: 1.2; overflow-wrap: anywhere; }
#page-product-master .pm-image-large { flex-basis: 52px; width: 52px; height: 52px; }
#page-product-master .pm-image-large .pm-image-fallback { font-size: 16px; }
#page-product-master .pm-identifiers { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
#page-product-master .pm-identifiers > div { display: inline-flex; gap: 4px; min-width: 0; font-size: 10px; line-height: 1.3; }
#page-product-master .pm-identifiers dt { color: var(--muted); }
#page-product-master .pm-identifiers dt::after { content: ':'; }
#page-product-master .pm-identifiers dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
#page-product-master .pm-detail-fields { flex: 0 0 auto; margin: 0; padding: 0; border: 0; }
#page-product-master .pm-detail-fields > div { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 8px; padding: 1px 0; font-size: 11px; line-height: 1.3; }
#page-product-master .pm-detail-fields dt { color: var(--muted); }
#page-product-master .pm-detail-fields dd { margin: 0; overflow-wrap: anywhere; }
#page-product-master .pm-section-label { flex: 0 0 auto; margin: 0; padding: 5px 7px; border-radius: 5px; background: #f1edff; font-size: 12px !important; line-height: 1.2 !important; }
#page-product-master .pm-edit-product { flex: 0 0 auto; width: 100%; margin: 0; justify-content: center; min-height: 32px; height: 32px; padding: 6px 10px; font-size: 12px; border-radius: 8px; box-shadow: none; }
#page-product-master .pm-edit-product svg { width: 16px; height: 16px; }
#page-product-master .pm-readonly { flex: 0 0 auto; color: var(--muted); font-size: 11px; margin: 0; }
@media (max-width: 1199px) {
 #page-product-master .product-master-workspace { grid-template-columns: minmax(0, 1fr); height: auto; }
 #page-product-master .product-master-panel { height: min(620px, 72dvh); }
 #page-product-master .product-master-details { max-height: none; }
 #page-product-master .pm-detail-body { overflow: visible; }
}
@media (max-width: 720px) {
 #page-product-master .product-master-filters.filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 #page-product-master .product-master-filters input { grid-column: 1 / -1; }
 #page-product-master .product-master-filters button,
 #page-product-master .product-master-filters input,
 #page-product-master .product-master-filters select { min-height: 38px; height: 38px; font-size: 12px; }
 #page-product-master .product-master-panel { height: min(700px, 85dvh); }
 #page-product-master .pm-page-buttons { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 420px) {
 #page-product-master .product-master-filters.filters { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px), (pointer: coarse) {
 #page-product-master .pm-product-select { min-height: 42px; }
 #page-product-master .product-master-table td { padding-block: 4px !important; }
 #page-product-master .pm-page-buttons button { min-height: 38px; height: 38px; }
}
