/* Arkusz (0.60): plan sheet. Classes start with sh-. The grid scrolls inside the screen; the page never does. */
.sh { --sh-nm: 250px; --sh-abc: 36px; --sh-pc: 60px; --sh-sum: 88px; --sh-yy: 74px; --sh-row: 30px;
  display: flex; flex-direction: column; height: calc(100vh - 48px); min-width: 0; overflow: hidden; background: #fff; font-size: 13px; }
.sh-empty { max-width: 560px; margin: 80px auto; padding: 0 16px; display: grid; gap: 12px; justify-items: start; }

/* toolbar: one line */
.sh-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fff; white-space: nowrap; overflow: hidden; }
.sh-search { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; width: 200px; flex: none; background: #fff; }
.sh-search:focus-within { border-color: var(--navy); }
.sh-lens { color: var(--ink-3); font-size: 15px; line-height: 1; }
.sh-q { border: 0; outline: none; font: 13px var(--font); color: var(--ink); width: 100%; min-width: 0; background: transparent; }
.sh-lbl { font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.sh-bar select { height: 30px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font: 600 12.5px var(--font); color: var(--navy-3); padding: 0 6px; max-width: 280px; }
.sh-count { color: var(--ink-3); font-size: 12px; }
.sh-warn { border: 0; background: var(--warn-soft); color: var(--warn); font: 700 12px var(--font); height: 26px; padding: 0 10px; border-radius: 13px; cursor: pointer; }
.sh-top { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.sh-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--navy-soft); color: var(--navy-3); font-size: 11px; font-weight: 700; }
.sh-tag.ok { background: var(--ok-soft); color: var(--ok); }

/* grid */
.sh-grid { flex: 1 1 auto; min-height: 120px; overflow: auto; position: relative; outline: none; background: #fff; }
.sh-t { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.sh-t th, .sh-t td { box-sizing: border-box; height: var(--sh-row); max-height: var(--sh-row); padding: 0 6px; border-bottom: 1px solid var(--line-2); white-space: nowrap; overflow: hidden;
  text-align: right; font-variant-numeric: tabular-nums; line-height: calc(var(--sh-row) - 1px); }
.sh-t thead th { position: sticky; top: 0; z-index: 3; height: 40px; max-height: 40px; line-height: 1.15; background: #FAFBFD; color: var(--ink-2); font-weight: 600; font-size: 11.5px; border-bottom: 1px solid var(--line); }
.sh-t th.sh-p, .sh-t td.sh-p { width: var(--sh-pc); min-width: var(--sh-pc); max-width: var(--sh-pc); padding: 0 5px; font-size: 12.5px; }
.sh-p1 { display: block; color: var(--navy-3); font-weight: 700; }
.sh-p2 { display: block; color: var(--ink-3); font-weight: 500; font-size: 10.5px; }
.sh-t td.sh-h { background: #F7F8FB; color: var(--ink-3); }
.sh-t thead th.sh-h { background: #F1F3F8; }
.sh-t .sh-today { border-left: 2px solid var(--navy); }
.sh-t th.sh-nm, .sh-t td.sh-nm { position: sticky; left: 0; z-index: 2; background: #fff; width: var(--sh-nm); min-width: var(--sh-nm); max-width: var(--sh-nm); text-align: left; padding: 0; }
.sh-t thead th.sh-nm { z-index: 5; padding: 0 10px; background: #FAFBFD; overflow: hidden; text-overflow: ellipsis; }
.sh-t th.sh-abc, .sh-t td.sh-abc { position: sticky; left: var(--sh-nm); z-index: 2; background: #fff; width: var(--sh-abc); min-width: var(--sh-abc); max-width: var(--sh-abc);
  text-align: center; padding: 0; color: var(--ink-2); font-weight: 600; font-size: 11px; border-right: 1px solid var(--line); }
.sh-t thead th.sh-abc { z-index: 5; background: #FAFBFD; }
.sh-t th.sh-sum, .sh-t td.sh-sum { width: var(--sh-sum); min-width: var(--sh-sum); border-left: 1px solid var(--line); font-weight: 650; color: var(--navy-3); }
.sh-t th.sh-yy, .sh-t td.sh-yy { width: var(--sh-yy); min-width: var(--sh-yy); }
.sh-up { color: var(--ok); } .sh-dn { color: var(--bad); }

.sh-nmi { display: flex; align-items: center; gap: 4px; height: calc(var(--sh-row) - 1px); padding-right: 8px; min-width: 0; overflow: hidden; }
.sh-tw { flex: none; display: inline-block; width: 14px; color: var(--ink-3); font-size: 10px; text-align: center; }
.sh-tg { cursor: pointer; }
.sh-tg:hover { color: var(--navy); }
.sh-lb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-cnt { flex: none; color: var(--ink-3); font-weight: 500; font-size: 11px; margin-left: 4px; }

/* levels */
.sh-d0 td { background: #F4F6FA; font-weight: 700; color: var(--navy-3); }
.sh-t .sh-d0 td.sh-nm, .sh-t .sh-d0 td.sh-abc { background: #F4F6FA; }
.sh-t .sh-d0 td.sh-h { background: #ECEFF5; }
.sh-d1 td { font-weight: 650; }
.sh-d1 td.sh-nm { color: var(--navy-3); }
.sh-r:hover td { background: #FBFCFE; }
.sh-t .sh-r:hover td.sh-h { background: #F3F5F9; }
.sh-t .sh-act td.sh-nm { box-shadow: inset 3px 0 0 var(--orange); background: #FFF9F4; }
.sh-spacer td { padding: 0; border: 0; height: auto; max-height: none; }

/* cells */
.sh-t td.sh-f { position: relative; cursor: cell; }
.sh-t td.sh-cor { background: var(--orange-soft); color: var(--orange-d); font-weight: 700; }
.sh-t td.sh-cor::after { content: attr(data-src); position: absolute; top: 2px; right: 3px; font-size: 8.5px; font-weight: 800; line-height: 1; color: var(--orange-d); }
.sh-t td.sh-diff::before { content: ""; position: absolute; left: 0; top: 0; border-top: 6px solid var(--blue); border-right: 6px solid transparent; }
.sh-t td.sh-sel { outline: 2px solid var(--navy); outline-offset: -2px; }
.sh-grid:not(:focus-within) .sh-t td.sh-sel { outline-color: #9AA7BD; }
.sh-t td.sh-editing { padding: 0; overflow: visible; }
.sh-in { width: 100%; height: calc(var(--sh-row) - 2px); border: 2px solid var(--orange); border-radius: 3px; text-align: right; font: 700 13px var(--font); color: var(--navy-3); padding: 0 4px; outline: none; background: #fff; box-sizing: border-box; }

/* preview at the bottom (Space) */
.sh-prev { flex: none; height: 220px; border-top: 1px solid var(--line); background: #fff; display: grid; grid-template-columns: minmax(0, 1fr) 340px; overflow: hidden; }
.sh-prev.sh-off { display: none; }
.sh-pv-chart { padding: 8px 14px 4px; min-width: 0; overflow: hidden; }
.sh-pv-chart .chart { height: 168px !important; }
.sh-pv-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sh-pv-head h3 { margin: 0; font-size: 13px; color: var(--navy-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.sh-pv-head .legend { flex: none; gap: 12px; font-size: 11.5px; flex-wrap: nowrap; }
.sh-pv-side { border-left: 1px solid var(--line); padding: 10px 14px; overflow: hidden auto; display: flex; flex-direction: column; gap: 8px; }
.sh-why { font-size: 12px; color: var(--ink-2); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.sh-why b { color: var(--navy-3); }
.sh-why .sh-tt { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 1px; }
.sh-why { flex: none; }
.btn.small.sh-mbtn { height: 21px; padding: 0 7px; margin: 0 6px; font-size: 11.5px; vertical-align: 1px; border-color: var(--orange); color: var(--orange-d); }

/* 0.72: the shared Zakres bar on top, a line while a filter is on, the button „Tylko ten wiersz” */
.sh-scope { flex: none; }
.sh-scope .scopebar { padding: 0 14px; overflow: hidden; }
.sh-scope .scope-items { padding: 5px 14px; }
.sh-fnote { display: none; flex: none; align-items: center; gap: 10px; padding: 5px 14px; background: var(--orange-soft); border-bottom: 1px solid #F6D9C2; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.sh-fnote.on { display: flex; }
.sh-fn-l { flex: none; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-d); }
.sh-fn-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sh-fnote .btn { flex: none; height: 24px; margin-left: auto; }
.sh-infilter { color: var(--orange-d); }
.btn.small.sh-only { flex: none; height: 22px; padding: 0 8px; font-size: 11.5px; }

/* status bar */
.sh-status { flex: none; height: 30px; display: flex; align-items: center; gap: 16px; padding: 0 14px; background: #F1F3F8; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.sh-status b { color: var(--navy-3); }
.sh-st-name { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.sh-keys { color: var(--ink-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }

/* half screen (about 1050 px): narrower name column, smaller preview, fewer controls */
@media (max-width: 1250px) {
  .sh { --sh-nm: 210px; --sh-pc: 56px; --sh-sum: 80px; --sh-yy: 64px; }
  .sh-search { width: 150px; }
  .sh-hide-s { display: none; }
  .sh-prev { height: 180px; grid-template-columns: minmax(0, 1fr) 270px; }
  .sh-pv-chart .chart { height: 130px !important; }
  .sh-pv-head .legend { display: none; }
  .sh-keys { display: none; }
}
@media (max-width: 900px) {
  .sh { height: auto; min-height: calc(100vh - 48px); }
  .sh-grid { height: 60vh; }
  .sh-prev { grid-template-columns: 1fr; height: auto; }
  .sh-pv-side { border-left: 0; border-top: 1px solid var(--line); }
}
