/* Архив креативов — тёмная тема. Без фреймворков.
   Ключевое отличие v2: контейнер .wrap с max-width (на 2560px не «размазывает»),
   единая высота всех контролов тулбара (--ctl-h), нормальные пустые состояния. */
:root {
  --bg: #0e0f11;
  --surface: #17191c;
  --surface-2: #1e2125;
  --hairline: #2a2e33;
  --strong: #3a3f45;
  --text: #eef0f2;
  --secondary: #b6bbc2;
  --tertiary: #7f858d;
  --accent: #f6bb45;
  --accent-ink: #161616;
  --danger: #ef5f6b;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --ctl-h: 38px;            /* единая высота ВСЕХ контролов тулбара */
  --topbar-h: 57px;         /* 56 + 1px бордер: иначе тулбар заезжал под шапку */
  --wrap: 1600px;           /* потолок ширины контента */
  --gutter: 24px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
/* Общий контейнер: центрирует и ограничивает ширину на больших экранах. */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; letter-spacing: .2px; white-space: nowrap; }
.logo { color: var(--accent); font-size: 18px; }

/* Кнопки */
.btn { height: var(--ctl-h); display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; }
.ghost { background: transparent; border-color: var(--strong); color: var(--secondary); transition: color .15s, border-color .15s; }
.ghost:hover { color: var(--text); border-color: var(--accent); }
.icon-btn { width: var(--ctl-h); height: var(--ctl-h); display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface); color: var(--secondary); font-size: 16px; transition: .15s; }
.icon-btn:hover { color: var(--accent); border-color: var(--strong); }

/* Логин */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(1200px 600px at 50% -10%, #1b1d21, var(--bg)); padding: 20px; }
.login-card { width: min(340px, 100%); background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.login-card .brand { justify-content: center; margin-bottom: 4px; }
.login-hint { color: var(--tertiary); text-align: center; margin: 0; font-size: 13px; }
.login-card input { background: var(--surface-2); border: 1px solid var(--strong); color: var(--text); border-radius: 10px; padding: 11px 13px; font-size: 15px; outline: none; }
.login-card input:focus { border-color: var(--accent); }
.login-card button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 12px; font-weight: 700; }
.login-card button:active { transform: translateY(1px); }
.login-err { color: var(--danger); font-size: 13px; text-align: center; min-height: 16px; }

/* Топбар */
.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(14,15,17,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.topbar-in { display: flex; align-items: center; gap: 16px; height: 56px; }
.stats { color: var(--tertiary); font-size: 12.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats b { color: var(--secondary); font-weight: 600; }
.disk.disk-warn { color: var(--accent); }
.disk.disk-warn b { color: var(--accent); }
.disk.disk-crit { color: var(--danger); font-weight: 600; }
.disk.disk-crit b { color: var(--danger); }

/* Вкладки Галерея | Статистика */
.tabs { display: inline-flex; gap: 2px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; padding: 3px; }
.tab { height: 30px; padding: 0 14px; border: 0; background: transparent; color: var(--tertiary); border-radius: 7px; font-size: 13px; font-weight: 600; transition: .12s; }
.tab:hover { color: var(--secondary); }
.tab.on { background: var(--accent-ink); color: var(--accent); box-shadow: inset 0 0 0 1px var(--strong); }

/* Таблицы (вкладка статистики + разбивка по гео) */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .3px; text-transform: uppercase; color: var(--tertiary); padding: 11px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .cname { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tbl .who { color: var(--accent); font-weight: 600; }
.tbl .muted { color: var(--tertiary); }
.tbl .good { color: #4ec98a; }
.geo-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; }

/* Разбивка по гео внутри лайтбокса */
.lb-stats { margin-top: 4px; }
.lb-stats h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--tertiary); }
.geo-card { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 11px; margin-bottom: 8px; }
.geo-card .geo-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.geo-card .geo-name { font-weight: 700; font-size: 13px; }
.geo-card .geo-spend { font-size: 12px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.geo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; font-size: 12px; }
.geo-grid .k { color: var(--tertiary); }
.geo-grid .v { text-align: right; font-variant-numeric: tabular-nums; }
.lb-note { font-size: 11.5px; color: var(--tertiary); }

/* Тулбар — все контролы одной высоты, выровнены по центру */
.toolbar { position: sticky; top: var(--topbar-h); z-index: 15; background: rgba(14,15,17,.74); backdrop-filter: blur(8px); border-bottom: 1px solid var(--hairline); }
.toolbar-in { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-block: 12px; }
.ctl { height: var(--ctl-h); }
.search { position: relative; flex: 1 1 260px; max-width: 420px; display: block; }
.search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--tertiary); pointer-events: none; }
.search input { width: 100%; height: var(--ctl-h); background: var(--surface); border: 1px solid var(--hairline); color: var(--text); border-radius: 10px; padding: 0 12px 0 36px; font-size: 13.5px; outline: none; }
.search input:focus { border-color: var(--accent); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }
.sel { background: var(--surface); border: 1px solid var(--hairline); color: var(--text); border-radius: 10px; padding: 0 32px 0 12px; font-size: 13px; outline: none; cursor: pointer; max-width: 220px;
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f858d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.sel:focus { border-color: var(--accent); }
.seg { height: var(--ctl-h); display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { height: calc(var(--ctl-h) - 8px); background: transparent; border: 0; color: var(--tertiary); border-radius: 7px; padding: 0 12px; font-size: 13px; font-weight: 500; transition: .12s; }
.seg button:hover { color: var(--secondary); }
.seg button.on { background: var(--accent-ink); color: var(--accent); box-shadow: inset 0 0 0 1px var(--strong); }

/* Контент */
.main { flex: 1; padding-block: 20px 40px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .12s, border-color .12s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-2px); border-color: var(--strong); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card .thumb { position: relative; aspect-ratio: 4 / 5; background: #0a0b0d; display: grid; place-items: center; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .thumb .ph { color: var(--strong); font-size: 30px; }
.card .badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.66); backdrop-filter: blur(4px); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; padding: 3px 7px; border-radius: 999px; }
.card .dur { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.card .play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.card .play svg { width: 44px; height: 44px; opacity: .9; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.card .meta { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 4px; }
.card .name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 11.5px; color: var(--tertiary); display: flex; align-items: center; gap: 7px; }
.card .who { color: var(--accent); font-weight: 600; }
.card .cnt { margin-left: auto; background: var(--surface-2); border-radius: 999px; padding: 1px 7px; color: var(--secondary); }

/* Скелетоны первой загрузки */
.skel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.skel .sk-thumb { aspect-ratio: 4 / 5; background: linear-gradient(100deg, #16181b 30%, #202329 50%, #16181b 70%); background-size: 220% 100%; animation: sh 1.2s infinite linear; }
.skel .sk-line { height: 10px; margin: 11px 11px 0; border-radius: 5px; background: #202329; }
.skel .sk-line.short { width: 55%; margin-bottom: 13px; }
@keyframes sh { from { background-position: 120% 0 } to { background-position: -20% 0 } }

.sentinel { height: 1px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--tertiary); padding: 80px 20px; }
.empty-art { font-size: 40px; color: var(--strong); }
.empty-title { color: var(--secondary); font-size: 16px; font-weight: 600; }
.empty-hint { font-size: 13px; max-width: 420px; }
.empty .btn { margin-top: 6px; }
.loader { display: flex; gap: 6px; justify-content: center; padding: 28px; }
.loader span { width: 8px; height: 8px; border-radius: 50%; background: var(--strong); animation: b 1s infinite ease-in-out; }
.loader span:nth-child(2){ animation-delay: .16s } .loader span:nth-child(3){ animation-delay: .32s }
@keyframes b { 0%,80%,100%{ transform: scale(.6); opacity:.5 } 40%{ transform: scale(1); opacity:1 } }

/* Лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.8); backdrop-filter: blur(6px); }
.lb-panel {
  position: relative; z-index: 1; width: min(1200px, 94vw); max-height: 92vh;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px;
  box-shadow: var(--shadow); display: grid; grid-template-columns: minmax(0,1fr) 320px;
  overflow: hidden; animation: pop .16s ease;
}
@keyframes pop { from { transform: scale(.97); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.lb-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.5); border: 0; color: #fff; font-size: 15px; }
.lb-close:hover { background: rgba(0,0,0,.78); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 60px; border: 0; border-radius: 10px; background: rgba(0,0,0,.42); color: #fff; font-size: 26px; line-height: 1; opacity: .75; transition: .15s; }
.lb-nav:hover { opacity: 1; background: rgba(0,0,0,.7); }
.lb-prev { left: 10px; } .lb-next { right: 330px; }
.lb-media { background: #000; display: grid; place-items: center; min-height: 340px; max-height: 92vh; overflow: hidden; }
.lb-media img, .lb-media video { max-width: 100%; max-height: 92vh; display: block; }
.lb-meta {
  padding: 22px 20px; display: flex; flex-direction: column; gap: 12px;
  /* min-height:0 обязателен: без него grid-элемент имеет min-height:auto,
     растягивается по контенту, и overflow-y:auto ничего не скроллит —
     панель просто обрезает хвост (баг «нельзя мотать вниз», 2026-08-03). */
  min-height: 0;
  /* Тот же потолок, что у .lb-panel (минус её рамка) — колонка не может стать
     выше панели, значит её overflow-y:auto действительно скроллит. */
  max-height: calc(92vh - 2px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lb-meta h3 { margin: 0; font-size: 16px; word-break: break-word; }
.lb-sub { font-size: 12px; color: var(--tertiary); margin-top: -6px; }
.lb-sub .who { color: var(--accent); font-weight: 600; }
.lb-more { border-top: 1px solid var(--hairline); padding-top: 10px; }
.lb-more summary { cursor: pointer; font-size: 12px; color: var(--tertiary); list-style: none; }
.lb-more summary::-webkit-details-marker { display: none; }
.lb-more summary::before { content: '▸ '; }
.lb-more[open] summary::before { content: '▾ '; }
.lb-more summary:hover { color: var(--secondary); }
.lb-more .lb-row:first-of-type { margin-top: 8px; }
.lb-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; border-bottom: 1px solid var(--hairline); padding-bottom: 8px; }
.lb-row .k { color: var(--tertiary); } .lb-row .v { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.lb-dl { margin-top: auto; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 13px; font-weight: 700; text-align: center; text-decoration: none; display: block; }
.lb-dl:active { transform: translateY(1px); }

@media (max-width: 900px) {
  :root { --gutter: 16px; }
  /* Мобильные: не приклеиваем тулбар (иначе 2 липких блока съедают треть
     экрана), прячем статистику, 16px в полях (иначе iOS зумит при фокусе),
     учитываем безопасные зоны. */
  .toolbar { position: static; }
  .stats { display: none; }
  .search input, .sel, .seg button { font-size: 16px; }
  .topbar-in { padding-top: env(safe-area-inset-top); }
  .main { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .lb-panel {
    grid-template-columns: 1fr;
    /* auto = медиа по своему размеру; minmax(0,1fr) = мета занимает остаток
       и МОЖЕТ сжиматься (min 0) — только тогда её overflow-y:auto работает. */
    grid-template-rows: auto minmax(0, 1fr);
    max-height: 94dvh;
  }
  .lb-media { max-height: 54vh; min-height: 0; } .lb-media img, .lb-media video { max-height: 54vh; }
  /* Запас снизу под домашнюю полоску iOS, иначе последняя карточка гео
     упирается в край экрана. */
  .lb-meta { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .lb-next { right: 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .search { max-width: none; }
}

/* ==== Доступы, гео и выделение (2026-08-03) ============================== */

/* Гео залива — над названием креатива. */
.geos { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 5px; }
.geo {
  font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em; padding: 3px 5px; border-radius: 4px;
  background: rgba(246,187,69,.14); color: #f6bb45;
  border: 1px solid rgba(246,187,69,.28);
}
.geo.more { background: rgba(255,255,255,.06); color: #9a9a9a; border-color: rgba(255,255,255,.12); }

/* Скрытый креатив (виден только владельцу). */
.badge.hid { left: auto; right: 8px; background: rgba(220,60,60,.85); }
.card.is-hidden-crea .thumb { opacity: .45; }
.card.is-hidden-crea .name { text-decoration: line-through; text-decoration-color: rgba(220,60,60,.6); }

/* Режим выделения пачкой. */
body.selecting .card { cursor: copy; }
.pick {
  position: absolute; inset: 0; border: 2px solid transparent; border-radius: 10px;
  pointer-events: none; transition: border-color .12s, background .12s;
}
.card.picked .pick { border-color: #f6bb45; background: rgba(246,187,69,.12); }
.card.picked .pick::after {
  content: '✓'; position: absolute; top: 8px; left: 8px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #f6bb45; color: #161616; font: 700 13px/20px system-ui; text-align: center;
}

.selbar {
  position: sticky; top: 56px; z-index: 30;
  background: rgba(22,22,22,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.selbar-in { display: flex; align-items: center; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
.selbar .spacer { flex: 1 1 auto; }
.selbar button[disabled] { opacity: .4; cursor: not-allowed; }

.ctl.btn.on, .tab.on { background: rgba(246,187,69,.16); color: #f6bb45; }

/* ---- Админка ---- */
.adm-sec { margin: 0 0 34px; }
.adm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.adm-head h2 { font-size: 16px; margin: 0; flex: 1 1 auto; }
.adm-hint { color: #8e8e8e; font-size: 13px; margin: 0 0 12px; }

.tag {
  display: inline-block; margin: 2px 4px 2px 0; padding: 3px 7px; border-radius: 5px;
  background: rgba(255,255,255,.07); font-size: 12px; color: #d6d6d6;
}
.tag.own { background: rgba(246,187,69,.16); color: #f6bb45; }
.tag.warn { background: rgba(220,60,60,.18); color: #ff8f8f; }

.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.danger { color: #ff8f8f; }
.alias-in {
  width: 100%; max-width: 260px; padding: 6px 9px; border-radius: 7px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  color: #eee; font: inherit; font-size: 13px;
}
.alias-in:focus { outline: none; border-color: rgba(246,187,69,.55); }

/* ---- Модалка доступа ---- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); }
.modal-card {
  position: relative; width: min(560px, 100%); max-height: 88vh; overflow: auto;
  background: #1b1b1b; border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
}
.modal-card h3 { margin: 0; font-size: 17px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #b8b8b8; }
.fld input {
  padding: 9px 11px; border-radius: 8px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12); color: #eee; font: inherit;
}
.fld input:focus { outline: none; border-color: rgba(246,187,69,.55); }
.fld input:disabled { opacity: .55; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #d6d6d6; cursor: pointer; }
.chk input { width: 15px; height: 15px; accent-color: #f6bb45; }
.chkgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px;
  max-height: 200px; overflow: auto; padding: 10px; border-radius: 9px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
}
.chkgrid.off { opacity: .35; pointer-events: none; }
.chkgrid i { font-style: normal; font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 640px) {
  .selbar { top: 0; }
  .selbar-in { gap: 6px; }
  .selbar .spacer { flex-basis: 100%; height: 0; }
}

/* Бейдж депозитов на карточке (зелёный — деньги). */
.geo.deps { background: rgba(76,200,120,.14); color: #6fd99a; border-color: rgba(76,200,120,.3); }

/* Полоска показателей на карточке (клики/реги/депы + цены). */
.cstats {
  display: flex; gap: 6px; margin-top: 6px; padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.cstats span {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 3px 2px; border-radius: 6px; background: rgba(255,255,255,.035);
  min-width: 0;
}
.cstats i { font-style: normal; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; color: #8a8a8a; }
.cstats b { font-size: 12px; color: #e8e8e8; line-height: 1.1; }
.cstats em { font-style: normal; font-size: 10px; color: #a9a9a9; }
.cstats span.good { background: rgba(76,200,120,.1); }
.cstats span.good b, .cstats span.good em { color: #6fd99a; }

/* Фильтр «цена депа от/до». */
.cpd-group { display: inline-flex; align-items: center; gap: 4px; }
.cpd-label { font-size: 12px; color: #8e8e8e; white-space: nowrap; }
.ctl.num {
  width: 64px; padding: 8px 8px; border-radius: 8px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  color: #eee; font: inherit; font-size: 13px;
}
.ctl.num:focus { outline: none; border-color: rgba(246,187,69,.55); }
.ctl.num::-webkit-outer-spin-button, .ctl.num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Сортировка по колонкам в таблице статистики. */
.tbl th[data-k] { cursor: pointer; user-select: none; white-space: nowrap; }
.tbl th[data-k]:hover { color: #eee; }
.tbl th[data-k].sorted { color: #f6bb45; }
.tbl th[data-k].sorted::after { content: ' ↓'; font-size: 10px; }
.tbl th[data-k].sorted[data-dir="asc"]::after { content: ' ↑'; }
