.products-page{--turquoise:#76cabe;--past:#8c7ca6;--product-card:var(--panel);--product-inset:#1d2538;--product-line:var(--border);--product-text:var(--text);--product-muted:var(--muted);color:var(--product-text);min-width:0;container-type:inline-size}
html[data-theme=light] .products-page{--turquoise:#359c91;--past:#b7a8cf;--product-inset:#e8ecf2}
.products-page *{box-sizing:border-box}.products-page h2,.products-page h3,.products-page p{margin:0;letter-spacing:normal}.products-page h3{font-size:12px;font-weight:500;color:var(--product-muted)}.products-page button{font:inherit}.products-page a{color:inherit}.products-page svg{stroke-linecap:round;stroke-linejoin:round}
.product-tools{display:flex;align-items:center;gap:16px;margin-bottom:8px}.product-search{position:relative;flex:1;max-width:440px;margin:0}.product-search svg{position:absolute;left:12px;top:11px;width:17px;height:17px;fill:none;stroke:var(--product-muted);stroke-width:1.5}.product-search input{height:39px;width:100%;margin:0;padding:8px 10px 8px 38px;font-size:13px;background:var(--product-card);border:1px solid var(--product-line);border-radius:8px;color:var(--product-text)}.product-found,.product-freshness{font-size:12px;color:var(--product-muted);white-space:nowrap}.product-found{margin-left:auto}.product-refresh{display:grid;place-items:center;padding:9px!important;width:39px;height:39px}.product-refresh svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6}.product-refresh.is-refreshing svg{animation:product-refresh-spin 1s linear infinite}@keyframes product-refresh-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.product-refresh.is-refreshing svg{animation-duration:3s}}.product-status{min-height:22px;font-size:12px;color:var(--product-muted);margin-bottom:8px!important}.product-list{display:grid;gap:16px}
.product-card{min-width:0;background:var(--product-card);border:1px solid var(--product-line);border-radius:13px;padding:16px;box-shadow:0 4px 12px #060b1708}.layout-c{display:grid;grid-template-columns:100px minmax(0,1fr);gap:17px}.product-photo{display:block;width:100px;aspect-ratio:3/4;align-self:start;border-radius:9px;overflow:hidden;background:var(--product-inset)}.product-photo img{width:100%;height:100%;object-fit:contain;display:block}.product-no-photo{display:grid;place-items:center;font-size:12px;color:var(--product-muted)}.product-body{min-width:0}.product-top{display:flex;justify-content:space-between;align-items:start;gap:20px;padding-bottom:12px;border-bottom:1px solid var(--product-line)}.product-identity{max-width:520px;min-width:0}.product-card h2{font-size:17px;font-weight:650;line-height:1.35;overflow-wrap:anywhere}.product-card h2 a{text-decoration:none}.product-card h2 a:hover{color:var(--link)}.product-category{font-size:12px;color:var(--product-muted);margin-bottom:6px}.product-codes{display:flex;flex-wrap:wrap;gap:3px 14px;color:var(--product-muted);font-size:12px;margin-top:7px;line-height:1.6;overflow-wrap:anywhere}.product-codes b{color:var(--product-text);font-weight:400;margin-left:3px}.product-profit{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;min-width:450px;flex-shrink:0}.product-profit span{display:block;font-size:12px;color:var(--product-muted);margin-bottom:5px}.product-profit strong{font-size:21px;font-weight:650;line-height:1.3;white-space:nowrap}.product-profit small{display:block;font-size:10px;margin-top:3px;color:var(--product-muted)}
.compact-columns{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.2fr) minmax(0,1fr);gap:22px;padding-top:13px}.compact-columns>div{min-width:0}.compact-columns>div+div{border-left:1px solid var(--product-line);padding-left:22px}.product-stock h3{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.product-stock strong{font-size:17px;color:var(--product-text);font-weight:600}.product-stock small{font-size:11px;font-weight:400}.stock-split{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:var(--product-muted)}.stock-split b{display:inline-block;margin-left:5px;color:var(--product-text);font-weight:500}.stock-track{margin-top:8px;height:3px;border-radius:3px;background:#a28abe55;overflow:hidden}.stock-track i{display:block;height:100%;background:var(--turquoise)}.product-prices{margin-top:12px}.product-prices dl{margin:0}.product-prices dl>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 0;font-size:12px}.product-prices dt{color:var(--product-muted)}.product-prices dd{margin:0;font-weight:500;font-variant-numeric:tabular-nums;text-align:right}.info-dot{font-size:10px;opacity:.7}
.product-funnel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:0 0 9px;margin:0 0 6px;border-bottom:1px solid var(--product-line)}.product-funnel>div{padding-left:10px;border-left:1px solid var(--product-line)}.product-funnel>div:first-child{padding-left:0;border:0}.product-funnel span{font-size:11px;color:var(--product-muted);display:block}.product-funnel strong{font-size:16px;font-weight:600;display:block;margin:2px 0}.product-funnel small{font-size:10px;color:var(--product-muted)}.chart-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px;margin-bottom:6px}.chart-title>span{font-size:10px;color:var(--product-muted);white-space:nowrap}.chart-title i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--turquoise);margin:0 3px 0 6px}.chart-title i.past{background:var(--past)}.product-chart svg{display:block;width:100%;max-height:90px;color:var(--product-muted)}.product-chart-empty{font-size:12px;color:var(--product-muted);padding:22px 0}.plan-values{display:flex;align-items:baseline;margin-top:5px;gap:8px}.plan-values strong{font-size:20px;font-weight:650}.plan-values small{font-size:12px;color:var(--product-muted);font-weight:400}.product-plan p{font-size:11px;color:var(--product-muted);margin-top:7px}.product-reviews{border-top:1px solid var(--product-line);margin-top:12px;padding-top:10px}.product-reviews>div{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px}.product-reviews small{color:var(--product-muted)}
.product-actions{display:flex;gap:6px;padding-top:16px}.product-actions button,.product-module{min-width:0;flex:1;display:flex;align-items:center;justify-content:center;gap:5px;border-radius:7px;border:1px solid var(--product-line);background:var(--product-inset);color:var(--link)!important;padding:8px 5px;font-size:11px;white-space:nowrap;text-decoration:none}.product-actions button:disabled{opacity:.5;cursor:default}.product-module:hover{background:#ad91ee22;border-color:#ad91ee70}.product-actions svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;flex-shrink:0}.product-refresh-note{color:var(--product-muted);font-size:10px}.product-empty{padding:35px;text-align:center;color:var(--product-muted)}.product-pager{display:flex;align-items:center;justify-content:center;gap:18px;margin:22px 0;font-size:13px}.product-pager button{padding:7px 13px}
@container(max-width:1150px){.compact-columns{gap:14px}.compact-columns>div+div{padding-left:14px}.product-actions span{display:none}.product-card h2{font-size:16px}.product-profit{min-width:230px}.stock-split{font-size:11px}}
@container(max-width:900px){.product-top{flex-wrap:wrap}.product-profit{width:100%}.compact-columns{grid-template-columns:1fr 1.2fr}.compact-columns>div:last-child{grid-column:1/-1;border:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}.product-reviews{border:0;margin:0;padding:0}.product-actions{grid-column:1/-1;padding-top:0}.product-actions span{display:inline}}
@container(max-width:580px){.layout-c{grid-template-columns:65px minmax(0,1fr);gap:12px;padding:12px}.product-photo{width:65px;aspect-ratio:3/4}.compact-columns{display:block}.compact-columns>div+div{margin-top:15px;padding:15px 0 0;border-left:0;border-top:1px solid var(--product-line)}.compact-columns>div:last-child{display:block}.product-reviews{margin-top:14px}.product-actions{padding-top:14px}.product-profit{min-width:0;gap:12px}.product-freshness{margin-left:auto}.product-profit span{font-size:11px}.product-tools{gap:8px}.product-found{display:none}}
.products-page .product-card h2{font-size:17px}.products-page .product-refresh{min-width:39px;width:39px;flex:0 0 39px}.products-page .product-actions button{font-size:11px}

.settings-workspace .products-page .product-refresh{min-width:39px;width:39px;height:39px;min-height:39px;flex:0 0 39px}.products-page .stock-track{width:100%;height:3px;display:block;background:none}

.product-tools{flex-wrap:wrap}.product-filters{display:flex;gap:6px}.products-page .product-filters button{padding:8px 12px;min-height:39px;font-size:13px;white-space:nowrap}.products-page .product-filters button[aria-pressed=true]{background:#8c7ca655;border-color:#a698c2;color:var(--product-text)}.product-more{min-height:32px;text-align:center;padding:12px;font-size:12px;color:var(--product-muted)}.product-more[hidden]{display:none}

.products-page .product-price-title{font-size:12px;color:var(--product-text);font-weight:500;margin:0 0 6px}.product-chart-canvas{position:relative}.product-chart-canvas svg{max-height:130px}.product-chart-tooltip{position:absolute;bottom:calc(100% - 18px);width:208px;max-width:100%;padding:12px;border:1px solid var(--product-line);border-radius:12px;background:var(--product-card);box-shadow:0 8px 24px #0003;z-index:5;pointer-events:none;font-size:11px;color:var(--product-text)}.product-chart-tooltip[hidden]{display:none}.product-chart-tooltip strong{display:block;margin-bottom:8px;font-weight:500}.product-chart-tooltip>div{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-top:6px}.product-chart-tooltip b{font-weight:600;white-space:nowrap}.product-chart-tooltip small{display:block;margin-top:4px;color:var(--product-muted)}.product-chart-tooltip i{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--turquoise);margin-right:6px}.product-chart-tooltip i.past{background:var(--past)}.product-chart-canvas .chart-selected .product-chart-highlight{opacity:.07}.product-chart-canvas g:focus-visible{outline:1px solid var(--past);outline-offset:-1px}.product-chart-canvas g{cursor:crosshair}

@container(max-width:1350px){.product-actions span{display:none}}

/* Keep toolbar controls aligned despite global form label/input margins. */
.products-page .product-tools{align-items:center}
.products-page .product-tools .product-search{display:block;margin:0;padding:0;height:39px;min-height:39px;line-height:normal}
.products-page .product-tools .product-search input{display:block;box-sizing:border-box;height:39px;min-height:39px;margin:0;padding:8px 10px 8px 38px;line-height:normal}
.products-page .product-tools .product-filters button,.products-page .product-tools .product-refresh{box-sizing:border-box;height:39px;min-height:39px;margin:0;display:flex;align-items:center;justify-content:center}
.products-page .product-search svg{top:50%;transform:translateY(-50%)}

.products-page,html[data-theme=light] .products-page{--turquoise:#4ad3c1;--past:#ad91ee}

.product-prices dd.product-price-loss{color:var(--error);font-weight:700}

.product-profit .product-prior{display:flex;align-items:center;gap:4px;flex-wrap:wrap;line-height:1.4;margin-top:5px;font-size:11px}
.product-profit .product-prior span{display:inline;margin:0;font-size:inherit}
.product-profit .product-prior-value{color:var(--product-text);white-space:nowrap;font-variant-numeric:tabular-nums}
.product-trend{width:13px;height:15px;flex:0 0 13px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.product-trend.positive{color:var(--success)}.product-trend.negative{color:var(--error)}
@container(max-width:1150px){.product-top{flex-wrap:wrap}.product-profit{width:100%;min-width:0;max-width:580px}}
@container(max-width:580px){.product-profit{gap:8px}.product-profit strong{font-size:16px}.product-profit .product-prior{font-size:10px}.product-profit .product-prior-label{flex-basis:100%}}
.products-page .product-inline-link{display:inline;background:none;border:0;border-radius:0;padding:0;min-height:0;min-width:0;margin:0;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.product-review-link{display:inline-block;padding:3px 7px;margin:-3px -7px;border:1px solid transparent;border-radius:5px;text-underline-offset:3px}
.product-review-link.needs-attention{border-color:var(--error,#d3a3b8)}
.product-detail-dialog{width:min(600px,calc(100vw - 32px));max-height:85vh;overflow:auto;padding:20px;border:1px solid var(--product-line);border-radius:13px;background:var(--product-card);color:var(--product-text);box-shadow:0 16px 60px #0005}
.product-detail-dialog::backdrop{background:#0b1022aa}
.products-page .product-detail-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.products-page .product-detail-head h2{font-size:18px;line-height:1.4}
.products-page .product-detail-head button{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;min-width:32px;min-height:32px;padding:0;font-size:24px;line-height:1}
.products-page .product-detail-dialog>p{font-size:12px;color:var(--product-muted);margin:8px 0}
.product-detail-table{overflow:auto;margin-top:16px}.product-detail-table table{width:100%;border-collapse:collapse;font-size:13px}
.product-detail-table th,.product-detail-table td{padding:9px 8px;border-bottom:1px solid var(--product-line);text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.product-detail-table th:first-child,.product-detail-table td:first-child{text-align:left}.product-detail-table th{color:var(--product-muted);font-weight:500}
.product-detail-table tfoot{font-weight:600}.product-detail-table small{color:var(--product-muted)}
.products-page .product-detail-empty{padding:20px 0;line-height:1.6}

.products-page .product-detail-head [data-detail-close]{display:flex;align-items:center;justify-content:center;align-self:flex-start;padding:0;line-height:1;flex-shrink:0}
.products-page .product-detail-head [data-detail-close] svg{display:block;width:18px;height:18px;stroke:currentColor;stroke-width:2;fill:none;flex:none}
.products-page .product-competitor-inputs{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:10px;margin:12px 0}
.products-page .product-detail-dialog{max-width:720px;box-sizing:border-box}
.products-page .product-competitor-form{display:block;margin:0;padding:0}
.products-page .product-competitor-form p{margin:8px 0}
.products-page .product-competitor-inputs label{display:grid;gap:5px;min-width:0;margin:0;padding:0}
.products-page .product-competitor-inputs span{font-size:12px;color:var(--muted)}
.products-page .product-competitor-inputs input{width:100%;min-width:0;height:36px;padding:6px 10px;box-sizing:border-box}
.products-page .product-competitor-form button{width:auto;min-height:36px;padding:6px 16px;margin:0}
.products-page .product-detail-table th,.products-page .product-detail-table td{white-space:nowrap}

.product-competitor-stock{display:block;margin-top:3px;font-size:11px;line-height:1.4}

.products-page .product-competitor-dialog{width:min(800px,calc(100vw - 32px));max-width:800px}
.products-page .product-competitor-table{max-width:100%;overflow-x:auto}
.products-page .product-competitor-table table{table-layout:fixed;min-width:640px}
.products-page .product-competitor-table th:first-child,.products-page .product-competitor-table td:first-child{width:90px}
.products-page .product-competitor-table th,.products-page .product-competitor-table td{padding:8px 6px}
.products-page .product-competitor-table .product-competitor-stock{white-space:normal}
