/* WB settlement: read the store ledger first, then inspect fee categories. */
#wbSettlementPanel .settlement-analysis-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}
#wbSettlementPanel .subpanel-title > div { display: grid; gap: 5px; min-width: 0; }
#wbSettlementPanel .subpanel-title span { line-height: 1.5; }
#wbSettlementKpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#wbSettlementKpis article { border-bottom: 1px solid var(--line, #dfe5ec); }
#wbSettlementEquation {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.1fr);
  gap: 12px;
}
#wbSettlementStores { container-type:inline-size; max-height: 560px; overflow: auto; }
#wbSettlementStores table { min-width: 1380px; width: 100%; table-layout: auto; }
#wbSettlementStores th, #wbSettlementStores td { padding: 13px 16px; vertical-align: middle; }
#wbSettlementStores th { position: sticky; top: 0; z-index: 2; background: var(--theme-surface, #f7f9fb); white-space: nowrap; }
#wbSettlementStores th:first-child, #wbSettlementStores td:first-child {
  position: sticky; left: 0; min-width: 150px; max-width: 260px;
  z-index: 1; background: var(--theme-surface, #fff); word-break: normal; overflow-wrap: break-word;
}
#wbSettlementStores th:first-child { z-index: 3; }
#wbSettlementStores th:nth-child(2), #wbSettlementStores td:nth-child(2) { min-width: 95px; }
#wbSettlementStores th:nth-child(3), #wbSettlementStores td:nth-child(3) { min-width: 175px; max-width: 280px; }
#wbSettlementStores td:nth-child(3) small { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
#wbSettlementStores .num { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
/* Fee detail belongs to its store row, not a separate summary panel. */
#wbSettlementStores .wb-store-fee-toggle { display:block; margin-top:6px; font-size:11px!important; padding:4px 8px!important; height:auto!important; }
#wbSettlementStores tr.wb-inline-fee-row > td { position:static; max-width:none; padding:16px 20px; background:var(--theme-surface,#f7faf9); }
#wbSettlementStores .wb-inline-fees { position:sticky; left:20px; width:calc(100cqw - 40px); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 24px; }
#wbSettlementStores .wb-inline-fees button.ui-action { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:12px; align-items:center; min-width:0; padding:10px 4px!important; height:auto!important; white-space:normal; text-align:left; border:0!important; border-bottom:1px solid var(--line,#dfe5ec)!important; border-radius:0!important; box-shadow:none!important; background:transparent!important; }
#wbSettlementStores .wb-inline-fees button.ui-action:hover { background:#eef7f5!important; }
#wbSettlementStores .wb-inline-fees small { margin:0; white-space:nowrap; }
#wbSettlementStores .wb-inline-fees strong { white-space:nowrap; font-variant-numeric:tabular-nums; }
#wbSettlementStores .wb-inline-fee-note { position:sticky; left:20px; width:calc(100cqw - 40px); white-space:normal; margin:12px 0 0; font-size:12px; color:var(--muted,#7b879b); }
@media(max-width:1100px){#wbSettlementStores .wb-inline-fees{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width: 680px) {
  #wbSettlementStores .wb-inline-fees { grid-template-columns:minmax(0,1fr); }
  #wbSettlementKpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #wbSettlementKpis article { padding: 12px 10px; }
  #wbSettlementKpis b { font-size: 14px; }
  #wbSettlementEquation { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  #wbSettlementEquation > i { text-align: center; }
  #wbSettlementEquation article { min-width: 0; }
  #wbSettlementPanel .settlement-analysis-grid { padding: 10px; gap: 12px; }
  #wbSettlementPanel .settlement-transaction-filters { flex-wrap: wrap; }
  #wbSettlementPanel .settlement-transaction-filters label { width: 100%; min-width: 0; }
  #wbSettlementPanel .settlement-transaction-filters input,
  #wbSettlementPanel .settlement-transaction-filters select { width: 100%; min-width: 0; }
}

/* Ozon and Yandex share store-scoped inline fee detail. */
:is(#ozonSettlementPanel,#yandexSettlementPanel) .settlement-analysis-grid{grid-template-columns:minmax(0,1fr);align-items:start;}
:is(#ozonSettlementPanel,#yandexSettlementPanel) .subpanel-title>div{display:grid;gap:5px;}
:is(#ozonSettlementStores,#yandexSettlementStores){container-type:inline-size;max-height:560px;overflow:auto;}
:is(#ozonSettlementStores,#yandexSettlementStores) table{min-width:1180px;width:100%;table-layout:auto;}
:is(#ozonSettlementStores,#yandexSettlementStores) th,:is(#ozonSettlementStores,#yandexSettlementStores) td{padding:13px 16px;}
:is(#ozonSettlementStores,#yandexSettlementStores) th{position:sticky;top:0;background:var(--theme-surface,#fff);z-index:2;white-space:nowrap;}
:is(#ozonSettlementStores,#yandexSettlementStores) td:first-child{min-width:150px;}
:is(#ozonSettlementStores,#yandexSettlementStores) .num{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums;}
/* Fee detail belongs to its store row, not a separate summary panel. */
:is(#ozonSettlementStores,#yandexSettlementStores) .settlement-store-fee-toggle { display:block; margin-top:6px; font-size:11px!important; padding:4px 8px!important; height:auto!important; }
:is(#ozonSettlementStores,#yandexSettlementStores) tr.settlement-inline-fee-row > td { position:static; max-width:none; padding:16px 20px; background:var(--theme-surface,#f7faf9); }
:is(#ozonSettlementStores,#yandexSettlementStores) .settlement-inline-fees { position:sticky; left:20px; width:calc(100cqw - 40px); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 24px; }
:is(#ozonSettlementStores,#yandexSettlementStores) .settlement-inline-fees button.ui-action { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:12px; align-items:center; min-width:0; padding:10px 4px!important; height:auto!important; white-space:normal; text-align:left; border:0!important; border-bottom:1px solid var(--line,#dfe5ec)!important; border-radius:0!important; box-shadow:none!important; background:transparent!important; }
:is(#ozonSettlementStores,#yandexSettlementStores) .settlement-inline-fees button.ui-action:hover { background:#eef7f5!important; }
:is(#ozonSettlementStores,#yandexSettlementStores) .settlement-inline-fees small { margin:0; white-space:nowrap; }
:is(#ozonSettlementStores,#yandexSettlementStores) .settlement-inline-fees strong { white-space:nowrap; font-variant-numeric:tabular-nums; }
:is(#ozonSettlementStores,#yandexSettlementStores) .settlement-inline-fee-note { position:sticky; left:20px; width:calc(100cqw - 40px); white-space:normal; margin:12px 0 0; font-size:12px; color:var(--muted,#7b879b); }
@media(max-width:1100px){:is(#ozonSettlementStores,#yandexSettlementStores) .settlement-inline-fees{grid-template-columns:repeat(2,minmax(0,1fr));}}

@media(max-width:680px){:is(#ozonSettlementStores,#yandexSettlementStores) .settlement-inline-fees{grid-template-columns:minmax(0,1fr);}}
