.app, .main { grid-template-columns:minmax(0, 1fr); }
.main:has(#panel-drafts.active) { grid-template-rows:auto minmax(0, 1fr); }
.main:has(#panel-drafts.active) > .metrics { display:none; }
.product-mobile-meta { display:none; }
.products-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:22px; }
.products-head h2 { margin:0 0 6px; font-size:24px; letter-spacing:-.6px; }
.products-head p { margin:0; color:var(--muted); max-width:660px; line-height:1.6; }
.products-actions { display:flex; gap:8px; flex-shrink:0; }
.products-actions button { min-height:38px; padding:0 15px; }
.products-note { padding:12px 16px; border:1px solid var(--line); background:#fff; border-radius:8px; margin-bottom:16px; line-height:1.6; }
.products-note:empty { display:none; }
.products-note.error { border-color:#f0bbb6; background:#fff4f2; color:#a2332c; }
.products-toolbar { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:16px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.products-tabs { display:flex; gap:5px; flex-wrap:wrap; }
.products-tabs button { border-color:transparent; padding:7px 12px; color:var(--muted); background:transparent; }
.products-tabs button[aria-pressed=true] { color:var(--deep); background:#edf4fa; border-color:#d8e6f2; font-weight:750; }
.products-tabs small { margin-left:6px; opacity:.7; }
.products-search { display:flex; gap:8px; }
.products-search input { width:230px; }
.products-search select { width:140px; }
.products-table { width:100%; border-collapse:collapse; }
.products-table th { background:#f8fafc; padding:13px 16px; font-size:10px; color:var(--muted); letter-spacing:.5px; text-align:left; white-space:nowrap; }
.products-table td { padding:15px 16px; border-bottom:1px solid var(--line); vertical-align:middle; }
.products-table tbody tr:last-child td { border-bottom:0; }
.products-table tbody tr:hover { background:#fcfdff; }
.products-table .product-title-cell { min-width:260px; max-width:400px; }
.product-identity { display:flex; gap:13px; align-items:center; }
.product-thumb { width:48px; height:56px; border-radius:6px; border:1px solid var(--line); object-fit:contain; padding:4px; background:#fff; flex-shrink:0; }
.product-thumb-placeholder { display:grid; place-items:center; color:#9aabb9; font-size:20px; }
.product-name-button { display:block; border:0; padding:0; min-height:0; font-weight:750; text-align:left; color:var(--deep); background:none; line-height:1.45; }
.product-name-button:hover { color:var(--blue); text-decoration:underline; }
.product-meta { display:block; font-size:11px; color:var(--muted); margin-top:4px; }
.product-money { display:block; font-variant-numeric:tabular-nums; font-weight:750; color:var(--deep); white-space:nowrap; }
.product-money-note { display:block; margin-top:4px; font-size:10px; color:var(--muted); white-space:nowrap; }
.product-profit-positive { color:#08744f; }
.product-profit-negative { color:#b42318; }
.product-status { display:inline-block; padding:4px 9px; border-radius:20px; font-size:10px; font-weight:750; background:#edf2f7; color:#536b81; white-space:nowrap; }
.product-status.active { color:#08744f; background:#e7f8ef; }
.product-status.approved { color:#1559a0; background:#eaf3ff; }
.product-status.needs_information { color:#9d6119; background:#fff5e5; }
.products-footer { padding:13px 16px; color:var(--muted); font-size:11px; border-top:1px solid var(--line); line-height:1.6; }
.products-empty { padding:64px 24px; text-align:center; color:var(--muted); }
.products-empty strong { display:block; font-size:17px; color:var(--deep); margin-bottom:8px; }
.products-diagnostics { margin-top:18px; color:var(--muted); font-size:11px; line-height:1.7; }
.products-diagnostics summary { cursor:pointer; }
.product-dialog { width:min(1080px, calc(100vw - 32px)); max-height:92vh; padding:0; border:1px solid var(--line); border-radius:14px; color:var(--text); box-shadow:0 24px 100px #0f274040; background:#fff; }
.product-dialog::backdrop { background:#10283f70; backdrop-filter:blur(3px); }
.product-dialog-header { display:flex; justify-content:space-between; align-items:center; padding:20px 24px; border-bottom:1px solid var(--line); }
.product-dialog-header h3 { margin:0; font-size:19px; }
.product-dialog-header p { margin:5px 0 0; font-size:12px; color:var(--muted); }
.product-dialog-body { display:grid; grid-template-columns:minmax(0, 1.5fr) minmax(0, 1fr); }
.product-editor { padding:24px; }
.product-editor fieldset { margin:0 0 24px; padding:0; border:0; }
.product-editor legend { font-weight:800; font-size:13px; padding:0; margin-bottom:12px; }
.product-fields { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.product-fields label { display:flex; flex-direction:column; gap:6px; color:var(--muted); font-size:11px; font-weight:650; }
.product-fields .wide { grid-column:1/-1; }
.product-fields input, .product-fields select, .product-fields textarea { width:100%; min-height:38px; color:var(--text); border:1px solid var(--line-2); border-radius:6px; background:#fff; padding:9px 10px; font:inherit; font-size:12px; }
.product-fields textarea { resize:vertical; min-height:110px; line-height:1.6; }
.product-fields input[readonly], .product-fields select:disabled, .product-fields textarea[readonly] { background:#f5f8fa; color:#697c8c; }
.product-fields small, .product-editor .help { font-size:11px; font-weight:400; color:var(--muted); line-height:1.6; margin:7px 0 0; }
.product-offer-search { display:flex; gap:7px; margin-top:12px; }
.product-offer-search input { flex:1; width:0; }
.product-offer-search select { width:125px; flex-shrink:0; }
.product-offer-results { max-height:190px; overflow:auto; margin:10px 0; }
.product-offer-result { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px; border:1px solid var(--line); margin-top:6px; border-radius:6px; }
.product-offer-result strong { font-size:11px; display:block; }
.product-offer-result small { display:block; color:var(--muted); margin-top:3px; font-size:10px; }
.product-linked-offer { border:1px solid var(--line); border-radius:7px; padding:11px; margin-top:8px; }
.product-linked-offer .source-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px; }
.product-linked-offer .source-title { color:var(--muted); font-size:11px; margin:6px 0; line-height:1.5; }
.product-linked-offer label { display:flex; align-items:flex-start; gap:7px; font-size:11px; color:var(--text); line-height:1.5; }
.product-linked-offer input { min-height:0; margin-top:2px; }
.product-preview { background:#f7f9fc; padding:24px; border-left:1px solid var(--line); }
.product-preview-label { text-transform:uppercase; letter-spacing:1px; font-size:10px; color:var(--muted); margin:0 0 14px; }
.product-preview-image { height:210px; background:#fff; display:flex; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:9px; margin-bottom:17px; }
.product-preview-image img { max-height:185px; max-width:90%; object-fit:contain; }
.product-preview h4 { font-size:20px; line-height:1.45; color:var(--deep); margin:0 0 9px; }
.product-preview-price { font-size:23px; font-weight:800; color:var(--deep); margin:13px 0; }
.product-preview-description { font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
.product-preview-description p { margin:12px 0; }
.product-missing { font-size:11px; color:#92704a; padding-top:14px; border-top:1px solid var(--line); line-height:1.8; margin-top:18px; }
.product-events { margin-top:24px; font-size:10px; line-height:1.9; color:var(--muted); }
.product-dialog-footer { position:sticky; bottom:0; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:16px 24px; background:#fff; border-top:1px solid var(--line); }
.product-dialog-footer .footer-actions { display:flex; gap:8px; flex-wrap:wrap; }
.product-dialog-footer button { min-height:38px; }
.product-dialog-status { padding:0 24px; font-size:12px; line-height:1.6; color:var(--good); }
.product-dialog-status:not(:empty) { padding-top:14px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.product-dialog-status.error { color:var(--bad); background:#fff6f4; }
.product-dialog .product-open-shopify { display:inline-flex; align-items:center; padding:9px 12px; border:1px solid var(--line); border-radius:6px; color:var(--blue); font-weight:650; text-decoration:none; }
@media(max-width:760px) {
  .products-head { align-items:flex-start; flex-direction:column; }
  .products-head h2 { font-size:22px; }
  .products-toolbar { padding:12px; gap:12px; }
  .products-search { width:100%; }
  .products-search input { flex:1; width:0; }
  .products-search select { width:120px; }
  .products-tabs { max-width:100%; }
  .products-table { min-width:0; table-layout:fixed; }
  .products-table .product-title-cell { min-width:0; max-width:none; }
  .products-table th, .products-table td { padding:13px 10px; }
  .products-table th:nth-child(2), .products-table td:nth-child(2),
  .products-table th:nth-child(3), .products-table td:nth-child(3),
  .products-table th:nth-child(4), .products-table td:nth-child(4),
  .products-table th:nth-child(5), .products-table td:nth-child(5),
  .products-table th:nth-child(8), .products-table td:nth-child(8),
  .products-table th:nth-child(9), .products-table td:nth-child(9) { display:none; }
  .products-table th:nth-child(6) { width:95px; }
  .products-table th:nth-child(7) { width:105px; }
  .product-identity { gap:9px; align-items:flex-start; }
  .product-thumb { width:36px; height:44px; }
  .product-mobile-meta { display:block; font-size:10px; line-height:1.6; margin-top:5px; color:var(--muted); }
  .product-name-button { font-size:12px; }
  .product-dialog { width:calc(100vw - 16px); max-height:96vh; }
  .product-dialog-body { grid-template-columns:1fr; }
  .product-preview { border-left:0; border-top:1px solid var(--line); }
  .product-editor, .product-preview { padding:18px; }
  .product-dialog-footer { padding:12px; flex-wrap:wrap; }
}
.product-dialog [hidden] { display:none !important; }
