/* Supplier dashboard: scoped period metrics. */
dialog.supplier-product-dialog .supplier-product-search { width:100%;height:34px;margin:0 0 14px;padding:7px 10px;border:1px solid #d7e2ef;border-radius:7px;background:#fff;color:#142d50;font:500 13px/1.35 Inter,sans-serif; }
dialog.supplier-product-dialog .supplier-product-more { display:block;margin:16px auto 0;padding:7px 16px;min-height:32px;border:0;border-radius:7px;background:#1d304b;color:#fff;font:550 13px/1.35 Inter,sans-serif;cursor:pointer; }
html #app.supplier-dashboard-page .supplier-metrics-table .supplier-period-button { border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:inherit!important;font:550 13px/1.35 Inter,sans-serif!important;text-align:left!important;padding:6px 0!important;cursor:pointer;white-space:normal!important; }
.supplier-product-detail { min-width:0; container-type:inline-size; }
html.supplier-products-open,html.supplier-products-open body { overflow:hidden!important; }
html.supplier-products-open #app .warehouse-page-dashboard { overflow:hidden!important; }
dialog.supplier-product-dialog { position:fixed;inset:0;width:min(1180px,calc(100vw - 32px));height:min(760px,calc(100dvh - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:0;margin:auto;border:1px solid #d7e2ef;border-radius:10px;background:#fff;color:#142d50;overflow:hidden;box-shadow:none!important;text-shadow:none!important;font-family:Inter,sans-serif; }
dialog.supplier-product-dialog[open] { display:flex;flex-direction:column; }
dialog.supplier-product-dialog:not([open]) { display:none; }
dialog.supplier-product-dialog::backdrop { background:rgba(20,35,63,.58);backdrop-filter:blur(7px); }
dialog.supplier-product-dialog * { box-shadow:none!important;text-shadow:none!important;box-sizing:border-box;letter-spacing:0; }
dialog.supplier-product-dialog .supplier-product-heading { flex:0 0 auto;min-height:70px;padding:18px 20px;margin:0;border-bottom:1px solid #e1e9f2;flex-wrap:nowrap;background:#fff; }
dialog.supplier-product-dialog .supplier-product-heading > div { min-width:0; }
dialog.supplier-product-dialog .supplier-product-heading h2 { font:650 18px/1.3 Inter,sans-serif;overflow-wrap:anywhere; }
dialog.supplier-product-dialog [data-supplier-products-count] { display:block;margin-top:5px;color:#7187a3;font:500 10px/1.3 Inter,sans-serif; }
dialog.supplier-product-dialog .supplier-product-close { flex:0 0 32px;width:32px;height:32px;border:1px solid #d7e2ef;border-radius:7px;background:#fff;color:#142d50;padding:0;font:400 20px/1 Inter,sans-serif;cursor:pointer; }
dialog.supplier-product-dialog button:focus-visible { outline:2px solid #416ceb;outline-offset:2px; }
dialog.supplier-product-dialog .supplier-product-body { flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 20px 20px;scrollbar-gutter:stable; }
dialog.supplier-product-dialog .supplier-product-table { overflow:visible; }
dialog.supplier-product-dialog .supplier-product-head { position:sticky;top:-16px;z-index:1;border-radius:9px 9px 0 0; }
@media(max-width:760px) {
  dialog.supplier-product-dialog { width:calc(100vw - 16px);height:min(92dvh,800px);max-height:calc(100dvh - 16px); }
  dialog.supplier-product-dialog .supplier-product-heading { padding:14px; }
  dialog.supplier-product-dialog .supplier-product-body { padding:12px; }
  dialog.supplier-product-dialog .supplier-product-head { top:-12px; }
}
.supplier-product-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap; }
.supplier-product-heading h2 { margin:0;font:650 18px/1.3 Inter,sans-serif;color:#142d50; }
.supplier-product-heading > span { color:#7187a3;font:500 10px/1.3 Inter,sans-serif; }
.supplier-product-table { border:1px solid #d7e2ef;border-radius:10px;overflow:hidden;background:#fff; }
.supplier-product-grid { display:grid;grid-template-columns:minmax(190px,2.4fr) repeat(5,minmax(0,1fr));align-items:center;min-width:0; }
.supplier-product-grid > * { min-width:0;padding:10px 12px;overflow-wrap:anywhere; }
.supplier-product-grid > [role="cell"]:not(:first-child) { overflow-wrap:normal;white-space:nowrap;padding:10px 6px; }
.supplier-product-head > * { padding:6px; }
.supplier-product-grid > [role="cell"]:not(:first-child),.supplier-product-grid > [role="columnheader"]:not(:first-child) { text-align:right;font-variant-numeric:tabular-nums; }
.supplier-product-head { min-height:54px;background:#eaf1f8;color:#49637f;font:650 13px/1.35 Inter,sans-serif; }
.supplier-product-row { min-height:68px;border-top:1px solid #e1e9f2;background:#fff;color:#142d50;font:500 13px/1.35 Inter,sans-serif; }
.supplier-product-identity { display:flex;align-items:center;gap:12px; }
.supplier-product-identity > span:last-child { min-width:0; }
.supplier-product-identity strong { display:block;font:550 13px/1.35 Inter,sans-serif;overflow-wrap:anywhere; }
.supplier-product-identity small,.supplier-product-name { display:block;color:#7187a3;font:500 10px/1.3 Inter,sans-serif;overflow-wrap:anywhere; }
.supplier-product-photo { flex:0 0 42px;width:42px;height:42px;border:1px solid #d7e2ef;border-radius:6px;background:#f6f9fd;overflow:hidden;display:grid;place-items:center; }
.supplier-product-photo img { width:100%;height:100%;object-fit:contain; }
.supplier-product-status { padding:24px 18px;border:1px solid #d7e2ef;border-radius:10px;background:#fff;font:500 13px/1.35 Inter,sans-serif;color:#49637f; }
.supplier-product-status button { margin-left:8px;border:0;border-radius:7px;padding:8px 13px;background:#1d304b;color:#fff;font:550 13px/1.35 Inter,sans-serif;cursor:pointer; }
@container(max-width:680px) {
  .supplier-product-head { display:flex;flex-wrap:wrap;padding:6px;gap:4px; }
  .supplier-product-head > [role="columnheader"] { flex:1 1 44%;padding:4px; }
  .supplier-product-head > :first-child { display:none; }
  .supplier-product-row { display:block;padding:10px 12px; }
  .supplier-product-row > [role="cell"]:not(:first-child) { display:flex;justify-content:space-between;gap:12px;padding:7px 0; }
  .supplier-product-row > [data-label]::before { content:attr(data-label);color:#7187a3;text-align:left; }
  .supplier-product-identity { padding:0 0 8px; }
}
.supplier-metrics { display:grid; gap:16px; min-width:0; max-width:100%; color:#142d50; font-family:Inter,sans-serif; }
.supplier-metrics > * { min-width:0; max-width:100%; }
.supplier-metrics-note { margin:0;color:#7187a3;font:500 11px/1.35 Inter,sans-serif;overflow-wrap:anywhere; }
.supplier-metrics-toolbar { display:flex; align-items:center; justify-content:flex-end; min-height:52px; }
.supplier-metrics-period { display:flex; align-items:center; height:40px; padding:3px; border:1px solid #d5e1ef; border-radius:10px; background:#eaf0f7; }
.supplier-metrics-period button { height:32px; min-width:112px; padding:0 13px; border:0; border-radius:7px; background:transparent; color:#142d50; font:550 13px/1.35 Inter,sans-serif; cursor:pointer; box-shadow:none; }
.supplier-metrics-period button.active { color:#fff; background:#1d304b; }
.supplier-metrics button:focus-visible { outline:2px solid #416ceb; outline-offset:2px; }
.supplier-metrics-table-wrap { width:100%; min-width:0; background:transparent; }
.supplier-metrics-table { width:100%; min-width:0; border:1px solid #d7e2ef; border-radius:10px; border-collapse:separate; border-spacing:0; table-layout:fixed; font-variant-numeric:tabular-nums; background:#fff; overflow:hidden; }
.supplier-metrics-label-col { width:10%; }
.supplier-metrics-period-col { width:20%; }
.supplier-metrics-qty-col { width:10%; }
.supplier-metrics-cost-col { width:20%; }
.supplier-metrics-table tr > * { padding:8px; border-right:0; text-align:right; vertical-align:middle; letter-spacing:0; overflow-wrap:anywhere; }
.supplier-metrics-table tr > :last-child { border-right:0; }
.supplier-metrics-table thead th { height:54px;padding:4px 6px; color:#49637f; background:#eaf1f8; font:650 13px/1.35 Inter,sans-serif; text-transform:none!important; }
html #app.supplier-dashboard-page .supplier-metrics-table thead th:first-child { padding-left:6px!important; }
.supplier-metrics-table tr > :nth-child(-n+2) { text-align:left; }
.supplier-metrics-table tbody tr > * { height:68px; border-top:1px solid #e1e9f2; color:#142d50; font:500 13px/1.35 Inter,sans-serif; }
.supplier-metrics-table tbody th { position:static; background:#fff; box-shadow:none; font-weight:550; text-transform:none; white-space:normal; }
.supplier-metrics-table tbody tr:hover > * { background:#f7f9fb; }
.supplier-metrics-table .supplier-metrics-empty { padding:30px; text-align:center; color:#7187a3; }
.supplier-metrics-message { border:1px solid #d7e2ef; border-radius:8px; padding:12px; background:#fff; color:#49637f; font:500 13px/1.35 Inter,sans-serif; }
html #app.warehouse-live-page.supplier-dashboard-page > .sellerpilot-warehouse-live.sp-e4-app { grid-template-columns:204px minmax(0,1fr)!important; }
#app.supplier-dashboard-page .rsk-shell { min-width:0!important; max-width:100%!important; overflow-x:clip!important; }
#app.supplier-dashboard-page .warehouse-page-dashboard { width:100%!important; min-width:0!important; height:100dvh!important; max-height:100dvh!important; padding:26px 20px 36px!important; overflow-y:auto!important; overflow-x:clip!important; background:transparent!important; border:0!important; box-shadow:none!important; }
@media(max-width:980px) { .supplier-metrics-table tr > * { padding:8px; } }
.supplier-metrics-table tbody td:not(:first-child) { overflow-wrap:normal;white-space:nowrap; }
@media(max-width:700px) {
  html #app.warehouse-live-page.supplier-dashboard-page > .sellerpilot-warehouse-live.sp-e4-app { grid-template-columns:62px minmax(0,1fr)!important; }
  html #app.warehouse-live-page.supplier-dashboard-page .sp-e4-nav { width:62px!important; min-width:0!important; padding-left:10px!important; padding-right:10px!important; }
  html #app.warehouse-live-page.supplier-dashboard-page .sp-e4-nav-brand { width:42px!important; padding:0!important; gap:0!important; }
  html #app.warehouse-live-page.supplier-dashboard-page .sp-e4-nav-wordmark-wrap,
  html #app.warehouse-live-page.supplier-dashboard-page .sp-e4-nav-item > span:last-child,
  html #app.warehouse-live-page.supplier-dashboard-page .warehouse-cabinet-trigger > span,
  html #app.warehouse-live-page.supplier-dashboard-page [data-supplier-action="logout"] > span:last-child { position:absolute!important; width:1px!important; height:1px!important; overflow:hidden!important; clip-path:inset(50%)!important; white-space:nowrap!important; }
  html #app.warehouse-live-page.supplier-dashboard-page .sp-e4-nav-cabinet { width:42px!important; min-width:0!important; padding:0!important; }
  html #app.warehouse-live-page.supplier-dashboard-page .warehouse-cabinet-trigger { width:42px!important; min-width:0!important; padding:8px!important; justify-content:center!important; }
  html #app.warehouse-live-page.supplier-dashboard-page .warehouse-cabinet-menu { position:fixed!important; left:62px!important; right:12px!important; top:100px!important; width:auto!important; max-width:calc(100vw - 74px)!important; }
  html #app.warehouse-live-page.supplier-dashboard-page .sp-e4-nav-item { width:42px!important; min-width:0!important; padding:0!important; justify-content:center!important; gap:0!important; }
  html #app.warehouse-live-page.supplier-dashboard-page .warehouse-page-dashboard { padding:20px 12px!important; }
  .supplier-metrics-table,.supplier-metrics-table tbody,.supplier-metrics-table tr { display:block; width:100%; }
  .supplier-metrics-table { border:0; background:transparent; overflow:visible; }
  .supplier-metrics-table colgroup,.supplier-metrics-table thead { display:none; }
  .supplier-metrics-table tbody tr { margin-bottom:12px; padding:8px 12px; border:1px solid #d7e2ef; border-radius:10px; background:#fff; }
  .supplier-metrics-table tbody tr > * { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; height:auto; min-height:34px; padding:7px 0; border:0; text-align:right; }
  .supplier-metrics-table tbody th { display:block; margin-bottom:4px; border-bottom:1px solid #e1e9f2; font-weight:650; text-align:left; }
  .supplier-metrics-table td[data-label]::before { content:attr(data-label); color:#49637f; font-weight:500; text-align:left; }
  .supplier-metrics-table .supplier-metrics-empty { display:block; text-align:center; }
}

dialog.supplier-product-dialog [data-supplier-products-sort] { display:inline-flex;align-items:center;justify-content:flex-end;gap:4px;width:100%;min-width:0;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;text-align:right;cursor:pointer;white-space:normal; }
.supplier-product-sort-arrow { flex:0 0 12px;opacity:0;font-size:13px; }
[aria-sort="descending"] [data-supplier-products-sort] { color:#416ceb; }
[aria-sort="descending"] .supplier-product-sort-arrow { opacity:1; }


/* Period totals share the existing seven-column grid. */
html #app.supplier-dashboard-page .supplier-metrics-table tr > :nth-child(n+3) { text-align:center; }
html #app.supplier-dashboard-page .supplier-metrics-table tr > :nth-child(-n+2) { text-align:left;border-right:1px solid #e1e9f2!important; }
html #app.supplier-dashboard-page .supplier-metrics-table .supplier-metrics-total > * { background:#eaf1f8!important; }
html #app.supplier-dashboard-page .supplier-metrics-table .supplier-metrics-total th { font-weight:650;color:#49637f; }
html #app.supplier-dashboard-page .supplier-metrics-table .supplier-metrics-total td { font-weight:500; }
@media(max-width:700px) {
  html #app.supplier-dashboard-page .supplier-metrics-table tr > :nth-child(-n+2) { border-right:0!important; }
  html #app.supplier-dashboard-page .supplier-metrics-table .supplier-metrics-total { background:#eaf1f8; }
  html #app.supplier-dashboard-page .supplier-metrics-table .supplier-metrics-total > :nth-child(2) { display:none; }
}

/* Добавить в конец supplier-dashboard.css после общих правил warehouse-summary-e4.css.
   Используются только утверждённые цвета и типографика Чуем. */

/* Утверждённый итог: белый фон и синяя рамка 3 px, включая наведение. */
html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total > *,
html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total:hover > *,
html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total:active > *,
html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total:focus-within > * {
  background: #fff !important;
  border-top: 3px solid #416ceb !important;
  border-bottom: 3px solid #416ceb !important;
  box-shadow: none !important;
}

html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total > :first-child {
  border-left: 3px solid #416ceb !important;
}

html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total > :last-child {
  border-right: 3px solid #416ceb !important;
}

@media (min-width: 701px) {
  /* 48 px против 68 px у обычной строки. */
  html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total > *,
  html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total:hover > * {
    height: 48px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    box-sizing: border-box !important;
  }

  /* Номер недели/месяц и период: заголовки точно по оси значений. */
  html body #app.supplier-dashboard-page .supplier-metrics-table thead th:nth-child(-n + 2),
  html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr > :nth-child(-n + 2) {
    text-align: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  html body #app.supplier-dashboard-page .supplier-metrics-table .supplier-period-button {
    text-align: center !important;
  }
}

@media (max-width:700px) {
  html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total { border:3px solid #416ceb!important;background:#fff!important; }
  html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total > *,
  html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total:hover > *,
  html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total:active > *,
  html body #app.supplier-dashboard-page .supplier-metrics-table tbody tr.supplier-metrics-total:focus-within > * { border:0!important; }
}
/* Period detail: fixed controls, table-only scrolling and bounded photo preview. */
dialog.supplier-product-dialog .supplier-product-body{display:flex;flex-direction:column;gap:16px;min-height:0;overflow:hidden;padding:16px 20px 20px;scrollbar-gutter:auto}
dialog.supplier-product-dialog .supplier-product-search-field{flex:0 0 40px;display:flex;align-items:center;gap:12px;width:min(340px,100%);height:40px;padding:0 10px;border:1px solid #D7E2EF;border-radius:7px;background:#fff;color:#49637F}
dialog.supplier-product-dialog .supplier-product-search-field:focus-within{border-color:#416CEB}
dialog.supplier-product-dialog .supplier-product-search-field svg{flex:0 0 16px;width:16px;height:16px;stroke:currentColor}
dialog.supplier-product-dialog .supplier-product-search{flex:1 1 auto;min-width:0;width:100%;height:18px;margin:0;padding:0;border:0;border-radius:0;outline:0;background:transparent;color:#142D50;font:550 13px/1.35 Inter,sans-serif;transform:translateY(-2px)}
dialog.supplier-product-dialog .supplier-product-search::placeholder{color:#7187A3;opacity:1;font:500 11px/1.3 Inter,sans-serif}
dialog.supplier-product-dialog .supplier-product-table{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid #D7E2EF;border-radius:10px}
dialog.supplier-product-dialog .supplier-product-head{position:sticky;top:0;z-index:2;border-radius:0;background:#EAF1F8}
dialog.supplier-product-dialog .supplier-product-grid>[role=cell]:not(:first-child),dialog.supplier-product-dialog .supplier-product-grid>[role=columnheader]:not(:first-child),dialog.supplier-product-dialog [data-supplier-products-sort]{text-align:center;justify-content:center;font-variant-numeric:tabular-nums}
dialog.supplier-product-dialog [aria-sort=ascending] [data-supplier-products-sort],dialog.supplier-product-dialog [aria-sort=descending] [data-supplier-products-sort]{color:#416CEB}
dialog.supplier-product-dialog [aria-sort=ascending] .supplier-product-sort-arrow,dialog.supplier-product-dialog [aria-sort=descending] .supplier-product-sort-arrow{opacity:1}
dialog.supplier-product-dialog .supplier-product-more{flex:0 0 auto;margin:0 auto;min-height:32px;padding:0 13px;border-radius:7px;background:#1D304B;color:#fff;font:550 13px/1.35 Inter,sans-serif}
dialog.supplier-product-dialog .supplier-product-photo{cursor:zoom-in}
dialog.supplier-product-dialog .supplier-product-photo:focus-visible{outline:2px solid #416CEB;outline-offset:2px}
dialog.supplier-product-dialog .supplier-product-photo-preview{position:absolute;z-index:5;display:grid;place-items:center;width:160px;height:160px;padding:8px;border:1px solid #D7E2EF;border-radius:10px;background:#fff;pointer-events:none}
dialog.supplier-product-dialog .supplier-product-photo-preview[hidden]{display:none}
dialog.supplier-product-dialog .supplier-product-photo-preview img{width:100%;height:100%;object-fit:contain}
@media(max-width:780px){dialog.supplier-product-dialog .supplier-product-body{padding:12px}dialog.supplier-product-dialog .supplier-product-search-field{width:min(300px,100%)}}
/* Card-level detail totals share the approved white/blue dashboard total. */
dialog.supplier-product-dialog .supplier-product-sticky{position:sticky;top:0;z-index:2;background:#fff}
dialog.supplier-product-dialog .supplier-product-sticky .supplier-product-head{position:relative;top:auto}
dialog.supplier-product-dialog .supplier-product-total{min-height:48px;border:3px solid #416ceb;background:#fff;color:#142d50;font:500 13px/1.35 Inter,sans-serif}
dialog.supplier-product-dialog .supplier-product-total:hover,dialog.supplier-product-dialog .supplier-product-total:active{background:#fff}
dialog.supplier-product-dialog .supplier-product-total>strong{font-weight:650;color:#49637f}
dialog.supplier-product-dialog .supplier-product-total>[role=cell]{padding:4px 6px;text-align:center}
dialog.supplier-product-dialog .supplier-product-photo:not([tabindex]){cursor:default}
@container(max-width:680px){
  dialog.supplier-product-dialog .supplier-product-total{grid-template-columns:repeat(5,minmax(0,1fr));gap:0}
  dialog.supplier-product-dialog .supplier-product-total>[role=cell]{padding:5px 2px;white-space:normal;font-size:11px}
  dialog.supplier-product-dialog .supplier-product-total>strong{grid-column:1/-1}
}
