/* «Дашборд логистики» (static/logdash.js). Каркас — как у «Динамики финансов» (.fd-*): шапка и
   фильтры неподвижны. Справа сетка из пяти таблиц, как на странице PBI: сверху три узкие,
   снизу две широкие; каждая таблица прокручивается внутри своей карточки. */
.ld-side .fd-field{margin-bottom:6px}
.ld-side .msel{min-width:0;width:100%}
.ld-side .msel-btn{width:100%;text-align:left}
.ld-mp{display:flex;gap:6px}
.ld-main{flex:1;min-width:0;overflow:auto;padding:var(--sp-2);background:var(--panel2)}
.ld-grid{display:grid;gap:var(--sp-2);min-height:100%;
  grid-template-columns:minmax(0,1.45fr) minmax(0,1.1fr) minmax(0,.8fr);
  grid-template-rows:minmax(260px,40vh) minmax(360px,1fr);
  grid-template-areas:"a b c" "d d e"}
.ld-a{grid-area:a}.ld-b{grid-area:b}.ld-c{grid-area:c}.ld-d{grid-area:d}.ld-e{grid-area:e}
.ld-card{background:var(--panel);border:1px solid var(--line);border-radius:6px;display:flex;flex-direction:column;min-height:0;min-width:0}
.ld-card h3{margin:0;padding:5px 8px;font-size:14px;text-align:center;background:#b9d8f0;color:#1f2a37;border-radius:6px 6px 0 0}
.ld-scroll{flex:1;overflow:auto;min-height:0}
.ld-empty{padding:var(--sp-4)}

.ld-table{border-collapse:separate;border-spacing:0;font-size:12px;width:max-content;min-width:100%}
.ld-table th,.ld-table td{padding:2px 7px;border-bottom:1px solid #eef0f3;white-space:nowrap;text-align:right;background:var(--panel)}
.ld-table thead th{position:sticky;top:0;z-index:3;background:#f3f6f9;font-weight:700;border-bottom:1px solid var(--line-strong)}
.ld-table .ld-left{text-align:left}
.ld-table th.ld-mh{white-space:normal!important;min-width:74px;max-width:96px;line-height:1.2;vertical-align:bottom}
.ld-table .ld-c1{position:sticky;left:0;z-index:2;text-align:left;vertical-align:top;min-width:46px}
.ld-table .ld-c1b{position:sticky;left:46px;z-index:2;text-align:left;font-weight:600;border-right:1px solid var(--line)}
.ld-table thead .ld-c1,.ld-table thead .ld-c1b{z-index:4}
.ld-table .ld-tot{font-weight:700;background:#f7f9fb}
.ld-table tr.ld-first td{border-top:1px solid var(--line-strong)}
/* розовая строка — ключевая метрика блока, как заливка в PBI */
.ld-table tr.ld-pink td:not(.ld-c1){background:#f3b6e2}
.ld-table tr.ld-pink td.ld-c1b{background:#e98fd2}
.ld-sub{font-size:11px;font-weight:400;white-space:normal}

.ld-dirt .ld-c1d{position:sticky;left:0;z-index:2;text-align:left;min-width:260px;max-width:320px;white-space:normal!important;border-right:1px solid var(--line)}
.ld-dirt thead .ld-c1d{z-index:4}
.ld-dirt tr.ld-grand td{font-weight:700;background:#f7f9fb;border-bottom:1px solid var(--line-strong)}
.ld-dirt tbody tr:hover td{background:#f2f7fb}
.ld-dirt a{color:inherit;text-decoration:none}
.ld-dirt a:hover{text-decoration:underline}
.ld-barcell{position:relative}
.ld-bar{position:absolute;left:0;top:2px;bottom:2px;background:#8fc3ee;opacity:.75;border-radius:0 2px 2px 0}
.ld-bar-loss{background:#6aa6dc}
.ld-v{position:relative}
.ld-table td.ld-red{background:#f4a6a6}
.ld-table td.ld-green{background:#9ed78a}
.ld-table td.ld-grey{background:#d6d9de}
.ld-logt td.ld-left{position:sticky;left:0;z-index:2;max-width:190px;overflow:hidden;text-overflow:ellipsis;border-right:1px solid var(--line)}
.ld-logt thead th.ld-left{position:sticky;left:0;z-index:4}
.ld-logt tr.ld-grand td{font-weight:700;background:#f7f9fb;border-bottom:1px solid var(--line-strong)}

@media (max-width:1300px){
  .ld-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto;
    grid-template-areas:"a a" "b c" "d d" "e e"}
  .ld-card{max-height:70vh}
}
@media (max-width:700px){
  .ld-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"a" "b" "c" "d" "e"}
  .ld-dirt .ld-c1d{min-width:170px}
}
