/* --- table ------------------------------------------------------------ */
.tablewrap { position: relative; overflow: auto; max-height: calc(100vh - var(--topbar) - 230px); min-height: 320px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); background: var(--panel); }
tbody tr:nth-child(even) td { background: var(--stripe); }
tbody tr:hover td { background: var(--accent-soft); }
tbody tr.active td { background: var(--accent-soft); box-shadow: inset 0 0 0 0 var(--accent); }
tbody tr.active td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
thead th { position: sticky; z-index: 2; color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
thead tr.groups th { top: 0; height: 28px; padding-top: 6px; padding-bottom: 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 0; }
thead tr.cols th { top: 28px; }
thead tr:only-child th { top: 0; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th .sort { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
th .sort:hover { color: var(--ink); }
th[aria-sort] .sort { color: var(--ink); font-weight: 600; }
th .arrow { font-size: 12px; opacity: .35; }
th[aria-sort] .arrow { opacity: 1; }
.sticky-1, .sticky-2 { position: sticky; z-index: 1; }
thead .sticky-1, thead .sticky-2 { z-index: 3; }
td.sel, th.sel { width: 44px; min-width: 44px; max-width: 44px; padding-left: 14px; padding-right: 0; }
.sticky-1 { left: 0; }
.sticky-2 { left: 44px; box-shadow: 1px 0 0 var(--line); }
td[data-col=name] { min-width: 240px; }
.firm { display: block; max-width: 320px; }
.firm-name { border: 0; background: none; padding: 0; text-align: left; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.firm-name:hover { color: var(--accent); text-decoration: underline; }
.firm-name.visited { color: var(--muted); font-weight: 500; }
.firm-name.visited::after { content: " ✓"; font-size: 12px; }
th { position: relative; }
.col-resize { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 4; }
.col-resize:hover, .col-resize.active { background: var(--accent-soft); }
.sub { display: block; color: var(--muted); font-size: 12px; }
.city { display: none; }
table.no-city .city { display: inline; }
.empty-val { color: var(--faint); }
.tel { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; text-decoration: none; }
.tel:hover { text-decoration: underline; }
td.link { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neg { color: var(--bad); }
code.pkd { font-family: var(--mono); font-size: 12px; }
.skeleton td { color: transparent; }
.skeleton td span { display: block; height: 12px; border-radius: 4px; background: var(--sunken); animation: pulse 1.2s infinite; }
.loading-bar { position: sticky; top: 0; left: 0; z-index: 5; height: 3px; width: 100%; overflow: hidden; background: var(--accent-soft); }
.loading-bar::after { content: ""; position: absolute; inset: 0; width: 30%; background: var(--accent); animation: slide 1s infinite ease-in-out; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
.table-empty { padding: var(--s6); text-align: center; color: var(--muted); }
.table-empty .row { display: flex; gap: var(--s2); justify-content: center; flex-wrap: wrap; margin-top: var(--s3); }
.table-empty .outside { margin: var(--s4) auto 0; max-width: 520px; text-align: left; }
.table-empty .outside ul { margin: var(--s2) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s1); }
.table-empty .outside button { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-align: left; }

/* pagination */
.pager { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; margin-top: var(--s3); font-size: 14px; }
.pager button { min-width: 34px; height: 34px; padding: 0 var(--s2); border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.pager button[aria-current=page] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .info { margin-left: auto; color: var(--muted); display: flex; gap: var(--s2); align-items: center; }
.pager select { width: auto; height: 34px; }
.footnote { color: var(--muted); font-size: 12px; max-width: 75ch; }
td[data-col=address] { min-width: 200px; }
/* "Ocena": the number with a thin bar under it, filled to the score */
.score { display: inline-block; min-width: 32px; padding-bottom: 3px; font-variant-numeric: tabular-nums;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / var(--score) 2px no-repeat, linear-gradient(var(--line), var(--line)) left bottom / 100% 2px no-repeat; }
