/* ChatTracker v1.0.0
   Prosty dashboard: bez wielkich pustych belek, bez przesadzonych efektów.
   Backend/API/log viewer zostają nietknięte.
*/

:root {
  --bg: #0a0d12;
  --panel: #111722;
  --panel-2: #151c28;
  --panel-3: #0d1118;
  --line: rgba(185, 195, 215, .14);
  --line-2: rgba(185, 195, 215, .24);
  --text: #eef2f7;
  --soft: #c9d1de;
  --muted: #8b96a8;
  --muted-2: #657083;
  --accent: #9146ff;
  --accent-soft: rgba(145, 70, 255, .16);
  --logs: #5aa7ff;
  --green: #00d084;
  --red: #ff5f7a;
  --yellow: #ffd166;
  --radius: 16px;
  --radius-sm: 11px;
  --container: 1180px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --log-row-height: 44px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  scrollbar-color: rgba(145,70,255,.55) rgba(255,255,255,.06);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

body::before,
body::after,
.page-glow { display: none !important; }

button,
input,
select,
textarea { font: inherit; }
button { border: 0; }
img { max-width: 100%; }
a { color: inherit; }

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  margin-bottom: 12px;
  max-width: 920px;
  font-size: clamp(2.1rem, 5vw, 4.15rem);
  line-height: .98;
  letter-spacing: -.055em;
}

h2 {
  margin-bottom: 7px;
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}

h3 {
  margin-bottom: 7px;
  font-size: clamp(1.02rem, 1.7vw, 1.28rem);
  line-height: 1.1;
  letter-spacing: -.02em;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

code {
  color: var(--soft);
  font-family: var(--mono);
}

.is-hidden { display: none !important; }

.app { padding-bottom: 24px; }

.view,
.site-footer,
.admin-shell {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

.view { animation: pageIn .14s ease-out both; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: #0d1118;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand__logo {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: block;
  border-radius: 12px;
}

.brand__mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}

.brand__text { display: grid; min-width: 0; }
.brand__text strong,
.brand__text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand__text strong {
  font-size: .98rem;
  font-weight: 760;
  letter-spacing: -.025em;
}

.brand__text small {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 620;
}

.topbar__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.top-link,
.support-link,
.live-chip,
.text-button,
.button,
.toggle,
.mini-button,
.logs-channel-button,
.module-badge,
.back-link,
.channel-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  color: var(--soft);
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, transform .14s ease, opacity .14s ease;
}

.top-link:hover,
.support-link:hover,
.text-button:hover,
.toggle:hover,
.mini-button:hover,
.logs-channel-button:hover,
.back-link:hover,
.channel-pill:hover {
  border-color: rgba(145,70,255,.38);
  background: rgba(145,70,255,.11);
  color: var(--text);
}

body[data-module="logs"] .top-link:hover,
body[data-module="logs"] .support-link:hover,
body[data-module="logs"] .text-button:hover,
body[data-module="logs"] .toggle:hover,
body[data-module="logs"] .mini-button:hover,
body[data-module="logs"] .logs-channel-button:hover,
body[data-module="logs"] .back-link:hover,
body[data-module="logs"] .channel-pill:hover {
  border-color: rgba(90,167,255,.38);
  background: rgba(90,167,255,.10);
}

.support-link {
  min-height: 34px;
  padding-inline: 11px;
  border-color: rgba(199, 173, 255, .20);
  background: rgba(199, 173, 255, .055);
  color: #c7adff;
}

.support-link::before {
  content: "♥";
  font-size: .78rem;
  line-height: 1;
  opacity: .86;
}

.top-link.is-active,
.toggle.is-active,
.channel-pill.is-active {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

body[data-module="logs"] .top-link.is-active,
body[data-module="logs"] .toggle.is-active,
body[data-module="logs"] .channel-pill.is-active {
  background: var(--logs);
  color: #07111e;
}

.live-chip {
  cursor: default;
  border-radius: 999px;
}

.live-chip--inline {
  width: fit-content;
  margin-bottom: 12px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted-2);
}
.live-dot.is-live { background: var(--green); }
.live-dot.is-offline { background: var(--red); }

.button {
  min-height: 40px;
  border-color: transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 720;
}

body[data-module="logs"] .button {
  background: var(--logs);
  color: #07111e;
}

.button:hover { filter: brightness(1.05); }

.button--ghost,
.text-button,
.mini-button,
.back-link { background: rgba(255,255,255,.035); }

.button--small {
  min-height: 36px;
  padding: 0 12px;
  font-size: .82rem;
}

button:disabled,
.button:disabled,
.text-button:disabled,
.toggle:disabled,
.mini-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.is-disabled { pointer-events: none; opacity: .5; }

/* shared */

.card,
.logs-panel,
.admin-card,
.admin-login,
.admin-top,
.stat,
.hub-card,
.channel-tile,
.global-card,
.emote-card,
.ranking,
.mini-board,
.channel-hero,
.emote-detail,
.logs-hero,
.landing,
.hub-hero,
.global-top-card,
.day-user-item,
.user-emote-card,
.user-day-item,
.related-item,
.calendar-day {
  border: 1px solid var(--line);
  background: var(--panel);
}

.card,
.logs-panel,
.admin-card,
.admin-login,
.admin-top,
.channel-hero,
.emote-detail,
.logs-hero,
.landing,
.hub-hero,
.channel-tile,
.global-card,
.emote-card,
.global-top-card,
.day-user-item,
.user-emote-card,
.user-day-item,
.related-item,
.calendar-day {
  border-radius: var(--radius);
}

.card,
.admin-card,
.logs-panel { padding: 18px; }

.section-block,
.card,
.logs-panel { margin-top: 18px; }

.card__head,
.logs-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.card__head--wrap { flex-wrap: wrap; }

.kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.module-badge,
.emote-source-pill {
  width: fit-content;
  border-color: var(--line);
  background: var(--accent-soft);
  color: #c7adff;
}

.status-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 620;
}

.empty {
  padding: 14px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  font-weight: 620;
}

.empty--with-action { display: grid; gap: 10px; }

input,
select,
textarea {
  min-height: 40px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #0b0f16;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(145,70,255,.55);
}

body[data-module="logs"] input:focus,
body[data-module="logs"] select:focus,
body[data-module="logs"] textarea:focus {
  border-color: rgba(90,167,255,.55);
}

.field,
.logs-filters label { display: grid; gap: 7px; }

.field span,
.logs-filters label span,
.logs-picker__label,
.hub-strip span,
.stat span,
.mini-board span,
.mini-board__label,
.calendar-weekday,
.global-top-rest__label,
.admin-table th {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

/* home / emotes landing */

.hub-hero,
.landing,
.logs-hero,
.channel-hero,
.emote-detail {
  padding: clamp(20px, 3vw, 30px);
}

.hub-hero {
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, .45fr);
  gap: 20px;
  align-items: stretch;
}

.hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy p {
  max-width: 680px;
  font-size: clamp(.98rem, 1.4vw, 1.08rem);
}

.hero-actions,
.landing__actions,
.detail-actions,
.crumbs__actions,
.logs-user-actions,
.global-users-controls,
.logs-day-actions,
.admin-top__actions,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.hero-orb {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-3);
}

.hero-orb small {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.hub-card__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--accent-soft);
  color: #c7adff;
  font-size: 1.55rem;
  font-weight: 800;
}

.hub-card__icon--emote.has-emote {
  padding: 7px;
  overflow: hidden;
}
.hub-card__icon--emote.has-emote img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hub-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hub-strip article,
.stat,
.mini-board {
  padding: 15px;
  border-radius: 18px;
}

.hub-strip article {
  min-height: 94px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hub-strip article { border: 1px solid var(--line); background: var(--panel-3); }

.hub-strip strong,
.stat strong,
.mini-board strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1;
  letter-spacing: -.035em;
}

.hub-strip small,
.stat small,
.mini-board small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-weight: 620;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.hub-card {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 20px;
  border-radius: 26px;
  color: var(--text);
  text-decoration: none;
}

.hub-card small {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.hub-card strong {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: .98;
  letter-spacing: -.04em;
}

.hub-card b { color: #c7adff; }

.landing,
.logs-hero,
.channel-hero,
.emote-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .5fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.landing__panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.mini-board--wide { grid-column: 1 / -1; }

.section-heading { margin-bottom: 14px; }

.channel-list,
.global-grid,
.emote-grid,
.user-emote-grid,
.user-days-list,
.related-list {
  display: grid;
  gap: 14px;
}

.channel-list { grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); }
.global-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* channel / emotes */

.crumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.channel-hero__main,
.emote-detail__main,
.logs-hero__copy { min-width: 0; }

.quick-switch,
.logs-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-3);
}

.channel-pills { display: flex; gap: 8px; flex-wrap: wrap; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ranking {
  display: grid;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: var(--panel-3);
}

.rank-item {
  position: relative;
  min-height: 54px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d1118;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
}

.rank-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar, 0%);
  background: linear-gradient(90deg, rgba(145,70,255,.15), transparent);
  pointer-events: none;
}

.rank-item__pos,
.global-card__pos,
.day-user-rank,
.global-top-card__rank {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  color: var(--soft);
  font-weight: 750;
}

.rank-item__pos { width: 38px; height: 38px; }
.rank-item__main { position: relative; min-width: 0; display: flex; align-items: center; gap: 10px; }
.rank-item__main img,
.rank-item__main .emote-img { max-width: 42px; max-height: 34px; object-fit: contain; }
.rank-item__main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.rank-count { position: relative; color: #c7adff; font-weight: 750; }

.channel-tile,
.global-card,
.emote-card,
.related-item {
  position: relative;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
}

.channel-tile {
  min-height: 176px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 16px;
}

.channel-tile__top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--accent-soft);
  color: #c7adff;
  font-weight: 800;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.channel-tile__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.08rem; font-weight: 750; }
.channel-tile__numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-self: end; }
.channel-tile__numbers span { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-3); }
.channel-tile__numbers strong { display: block; font-size: 1.18rem; }
.channel-tile__numbers small,
.channel-tile__footer { color: var(--muted); font-weight: 620; }
.channel-tile__footer--split { display: flex; justify-content: space-between; align-items: center; }

.global-card {
  min-height: 170px;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 15px;
  text-align: center;
}
.global-card__pos { min-width: 44px; height: 30px; padding: 0 10px; justify-self: start; }
.global-card__image { height: 64px; display: grid; place-items: center; }
.global-card__image img,
.global-card .emote-img { max-height: 60px; object-fit: contain; }
.global-card h3,
.emote-card h3 { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-card strong,
.emote-card footer strong { color: #c7adff; font-size: 1.25rem; }
.global-card small { color: var(--muted); font-weight: 620; }

.emote-section .card__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.filters {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(190px, .8fr) repeat(3, auto);
  gap: 10px;
  align-items: end;
}
.toggle-group { display: flex; gap: 7px; flex-wrap: wrap; }

.emote-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); align-items: stretch; }
.emote-card {
  min-height: 190px;
  display: grid;
  grid-template-rows: 76px auto 1fr auto;
  gap: 8px;
  padding: 14px;
}
.emote-card__image { height: 76px; display: grid; place-items: center; }
.emote-card__image img,
.emote-card__image .emote-img { max-width: 100%; max-height: 72px; object-fit: contain; }
.emote-source-pill { padding: 4px 8px; border-radius: 999px; font-size: .7rem; font-weight: 750; }
.emote-source-pill--twitch { background: rgba(90,167,255,.12); color: #a8ccff; }
.emote-card footer { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.emote-card footer span { color: var(--muted); font-size: .8rem; font-weight: 620; }
.emote-grid.is-compact { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); }
.emote-grid.is-compact .emote-card { min-height: 160px; grid-template-rows: 54px auto 1fr auto; padding: 12px; }
.emote-grid.is-compact .emote-card__image { height: 54px; }
.emote-grid.is-compact .emote-card__image img,
.emote-grid.is-compact .emote-card__image .emote-img { max-height: 50px; }
.emote-card.is-filtered-out { display: none; }
.load-row { display: flex; justify-content: center; margin-top: 18px; }

.emote-detail { grid-template-columns: minmax(180px, .35fr) minmax(0, 1fr); }
.emote-detail__image {
  min-height: 210px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-3);
}
.emote-detail__image img,
.emote-detail__image .emote-img { max-height: 160px; object-fit: contain; }
.related-list { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.related-item { display: flex; align-items: center; gap: 12px; padding: 12px; }
.placeholder,
.placeholder--big { display: inline-block; width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.08); }
.placeholder--big { width: 96px; height: 96px; }

/* logs */

.logs-shell { display: grid; gap: 18px; }
.logs-hero { grid-template-columns: minmax(0, 1fr) minmax(300px, .42fr); }
.logs-channel-button { justify-content: space-between; width: 100%; min-height: 44px; }
.logs-channel-button small { color: var(--muted); }
.logs-channel-menu {
  display: none;
  position: absolute;
  top: calc(100% - 10px);
  left: 15px;
  right: 15px;
  z-index: 80;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: #0d1118;
}
.logs-picker { position: relative; }
.logs-channel-menu.is-open { display: grid; gap: 7px; }
.logs-channel-option {
  width: 100%;
  min-height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--soft);
  text-align: left;
  cursor: pointer;
}
.logs-channel-option:hover,
.logs-channel-option.is-active { border-color: rgba(90,167,255,.32); background: rgba(90,167,255,.10); color: var(--text); }
.logs-channel-option span { color: var(--muted); font-size: .82rem; font-weight: 620; }
.logs-channel-list:empty { display: none; }
.logs-panel--nested { margin-top: 14px; background: var(--panel-3); }
.global-users-controls input { min-width: 150px; }

.global-users-summary,
.logs-meta,
.logs-active-filter,
.logs-loading {
  padding: 10px 12px;
  border: 1px solid rgba(90,167,255,.24);
  border-radius: 12px;
  background: rgba(90,167,255,.08);
  color: var(--soft);
  font-weight: 650;
}

.logs-meta-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.logs-meta-row--toolbar .logs-meta { flex: 1 1 auto; }
.logs-day-actions .text-button { min-height: 34px; padding: 0 11px; font-size: .78rem; }
.logs-day-actions .text-button.is-active { border-color: rgba(90,167,255,.35); background: rgba(90,167,255,.12); color: #dce9ff; }
.logs-active-filter { display: none; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.logs-active-filter.is-visible { display: flex; }
.logs-active-filter strong { color: #dce9ff; }
.logs-active-filter__actions { display: flex; gap: 7px; flex-wrap: wrap; }
.logs-loading { display: none; margin-bottom: 10px; }
.logs-loading.is-visible { display: block; }
.logs-filters { display: flex; align-items: end; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.month-controls { display: flex; align-items: center; gap: 8px; }
.month-controls strong { min-width: 170px; color: var(--soft); text-align: center; text-transform: capitalize; }

.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calendar-weekday { padding: 0 8px 4px; }
.calendar-day {
  min-height: 72px;
  display: grid;
  align-content: space-between;
  padding: 10px;
  color: var(--text);
  text-decoration: none;
}
.calendar-day--empty { visibility: hidden; }

.calendar-day--no-logs {
  color: rgba(238,243,255,.72);
}
.calendar-day--no-logs:hover {
  background: rgba(255,255,255,.035);
}
.calendar-day.has-logs { border-color: rgba(90,167,255, calc(.18 + var(--heat, .1) * .36)); background: rgba(90,167,255, calc(.045 + var(--heat, .1) * .13)); }
.calendar-day.heat-5 { border-color: rgba(145,70,255,.42); background: rgba(145,70,255,.14); }
.calendar-day--today {
  position: relative;
  border-color: rgba(145,70,255,.58);
  background: linear-gradient(180deg, rgba(145,70,255,.16), rgba(90,167,255,.08));
  box-shadow: inset 0 0 0 1px rgba(185,151,255,.18);
}
.calendar-day.has-logs.calendar-day--today {
  border-color: rgba(185,151,255,.72);
  background: linear-gradient(180deg, rgba(145,70,255,.22), rgba(90,167,255,.11));
}
.calendar-day strong { font-size: 1rem; }
.calendar-day span { color: var(--muted); font-size: .78rem; font-weight: 620; }
.calendar-day__today {
  justify-self: start;
  width: max-content;
  margin-top: 4px;
  padding: 3px 7px;
  border: 1px solid rgba(185,151,255,.42);
  border-radius: 999px;
  background: rgba(145,70,255,.15);
  color: #d9c4ff;
  font-size: .68rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.chat-log-list--terminal {
  position: relative;
  height: min(680px, calc(100vh - 290px));
  min-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #06080c;
  color: #e8eefb;
  font-family: var(--mono);
  font-size: 12.5px;
  contain: strict;
  will-change: scroll-position;
}
.chat-log-list--virtual { contain: strict; }
.chat-virtual-spacer { position: relative; width: 100%; min-height: 100%; }
.chat-virtual-window { position: absolute; inset: 0 0 auto 0; will-change: transform; }
.chat-line {
  height: var(--log-row-height);
  display: grid;
  grid-template-columns: 74px minmax(150px, 220px) 10px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255,255,255,.045);
  contain: layout paint style;
}
.chat-line:hover { background: rgba(90,167,255,.07); }
.chat-line-time { color: #748198; white-space: nowrap; }
.chat-line-author { min-width: 0; display: flex; align-items: center; gap: 5px; }
.chat-badges { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.chat-badge-img { width: 18px; height: 18px; object-fit: contain; vertical-align: middle; }
.chat-badge-fallback {
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 5px;
  background: rgba(90,167,255,.18);
  color: #dbe8ff;
  font-size: 9px;
  font-weight: 800;
}
.chat-badge-fallback--seven { background: rgba(145,70,255,.20); color: #dacbff; }
.chat-user,
.chat-user-static {
  min-width: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--user-color, #a9c9ff);
  cursor: pointer;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-user:hover,
.chat-user-profile:hover { text-decoration: underline; }
.chat-user-profile { color: #718098; font-size: 11px; font-weight: 620; text-decoration: none; }
.chat-line-separator { color: #68758a; }
.chat-line-message { min-width: 0; overflow: hidden; color: #eaf0fb; text-overflow: ellipsis; white-space: nowrap; }
.chat-emote-link { position: relative; display: inline-flex; align-items: center; vertical-align: middle; text-decoration: none; }
.chat-emote { max-width: 110px; max-height: 31px; object-fit: contain; vertical-align: middle; }
.chat-emote-name {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 100%;
  z-index: 50;
  transform: translateX(-50%);
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c1220;
  color: var(--soft);
  font-family: var(--font);
  font-size: 11px;
  white-space: nowrap;
}
.chat-emote-link:hover .chat-emote-name { display: block; }
.chat-highlight { padding: 0 2px; border-radius: 4px; background: rgba(145,70,255,.32); color: #fff; }

.day-users-list,
.global-users-list { display: grid; gap: 8px; }
.global-top-podium { display: grid; grid-template-columns: 1.16fr .92fr .92fr; gap: 12px; margin-bottom: 14px; }
.global-top-card {
  min-height: 155px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 15px;
}
.global-top-card--leader { border-color: rgba(145,70,255,.34); background: rgba(145,70,255,.10); }
.global-top-card__rank { width: 46px; height: 46px; grid-row: span 2; }
.global-top-card__main { min-width: 0; }
.global-top-card__main strong { display: block; overflow: hidden; font-size: 1.1rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.global-top-card__main small,
.global-top-card__meta { color: var(--muted); font-weight: 620; }
.global-top-card__count strong { font-size: 1.9rem; letter-spacing: -.04em; }
.global-top-card--leader .global-top-card__count strong { color: #c7adff; }
.global-top-card__count span { color: var(--muted); font-size: .8rem; font-weight: 620; }
.global-top-card__meta,
.global-top-card__actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.global-top-card__meta span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0,0,0,.12); font-size: .76rem; }
.global-top-rest { display: grid; gap: 8px; }

.day-user-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 125px 142px;
  gap: 10px;
  align-items: center;
  padding: 12px;
}
.day-user-rank { width: 40px; height: 40px; }
.day-user-main { min-width: 0; }
.day-user-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-user-main small { color: var(--muted); font-weight: 620; }
.day-user-count strong { display: block; color: #a9c9ff; font-size: 1.22rem; }
.day-user-count span { color: var(--muted); font-size: .78rem; font-weight: 620; }
.day-user-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }

.logs-user-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; margin: 16px 0; }
.user-emote-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.user-emote-card,
.user-day-item { padding: 12px; color: var(--text); text-decoration: none; }
.user-emote-card { display: grid; justify-items: center; gap: 7px; text-align: center; }
.user-emote-card img,
.user-emote-card .emote-img { max-height: 48px; object-fit: contain; }
.user-emote-card strong,
.user-day-item strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-emote-card span { color: #c7adff; font-weight: 750; }
.user-emote-card small,
.user-day-item span { color: var(--muted); font-weight: 620; }
.user-day-item { display: flex; justify-content: space-between; gap: 10px; }

#userLatestMessages { display: grid; gap: 8px; max-height: 520px; overflow: auto; border: 0; background: transparent; font-family: var(--font); }
#userLatestMessages .chat-row { display: grid; grid-template-columns: 155px minmax(120px, 200px) minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.026); }
#userLatestMessages .chat-time,
#userLatestMessages .chat-day-link { color: var(--muted); font-size: .84rem; font-weight: 620; text-decoration: none; }
#userLatestMessages .chat-author { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
#userLatestMessages .chat-message { min-width: 0; color: var(--text); line-height: 1.35; overflow-wrap: anywhere; }

/* admin */

.admin-shell {
  margin: 0 auto 24px;
  padding-top: 14px;
}
.admin-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--soft);
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}
.admin-logo img {
  width: 38px;
  height: 38px;
  display: block;
}
.admin-top .admin-logo {
  margin-bottom: 10px;
}
.admin-shell--wide { width: min(1180px, calc(100% - 32px)); }
.admin-login { max-width: 460px; margin: 20px auto 0; padding: 22px; }
.admin-login h1,
.admin-top h1 { margin-bottom: 6px; font-size: clamp(1.9rem, 3vw, 2.8rem); }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; padding: 20px; }
.admin-card { margin-bottom: 16px; }
.admin-form { display: grid; gap: 10px; }
.admin-form--grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: center; }
.checkbox-line { min-height: 40px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 620; }
.checkbox-line input { width: auto; min-height: auto; }
.admin-back,
.admin-support-link { display: inline-flex; margin-top: 14px; color: #c7adff; font-weight: 700; text-decoration: none; }
.admin-support-link { color: #a991df; }
.admin-hint { margin: 12px 0 0; font-size: .9rem; }
.admin-success,
.admin-error,
.admin-error-row { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; font-weight: 650; }
.admin-success { border: 1px solid rgba(0,208,132,.25); background: rgba(0,208,132,.08); color: #bfffd0; }
.admin-error,
.admin-error-row { border: 1px solid rgba(255,95,122,.25); background: rgba(255,95,122,.08); color: #ffc3d0; }
.admin-table-wrap { overflow: auto; }
.admin-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.admin-table th,
.admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table td strong { display: block; }
.admin-table td span { color: var(--muted); font-size: .86rem; font-weight: 620; }
.status-pill { display: inline-flex; min-height: 28px; align-items: center; padding: 0 10px; border: 1px solid rgba(145,70,255,.28); border-radius: 999px; background: rgba(145,70,255,.12); color: #c7adff !important; font-weight: 700 !important; }
.admin-actions-cell { display: flex; gap: 8px; flex-wrap: wrap; }

/* motion / perf */

.hub-card,
.channel-tile,
.global-card,
.emote-card,
.global-top-card,
.day-user-item,
.user-emote-card,
.user-day-item,
.calendar-day,
.rank-item {
  transition: transform .14s ease, border-color .14s ease, background-color .14s ease, opacity .14s ease;
}

.hub-card:hover,
.channel-tile:hover,
.global-card:hover,
.emote-card:hover,
.global-top-card:hover,
.day-user-item:hover,
.user-emote-card:hover,
.user-day-item:hover,
.calendar-day:hover,
.rank-item:hover {
  transform: translateY(-1px);
  border-color: rgba(145,70,255,.32);
}

body[data-module="logs"] .hub-card:hover,
body[data-module="logs"] .channel-tile:hover,
body[data-module="logs"] .global-card:hover,
body[data-module="logs"] .emote-card:hover,
body[data-module="logs"] .global-top-card:hover,
body[data-module="logs"] .day-user-item:hover,
body[data-module="logs"] .user-emote-card:hover,
body[data-module="logs"] .user-day-item:hover,
body[data-module="logs"] .calendar-day:hover,
body[data-module="logs"] .rank-item:hover {
  border-color: rgba(90,167,255,.32);
}

.channel-tile,
.global-card,
.emote-card,
.global-top-card,
.day-user-item,
.pop-in {
  animation: itemIn .14s ease-out both;
  animation-delay: calc(min(var(--i, 0), 12) * 14ms);
}

@keyframes itemIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-line,
.chat-line:hover,
.chat-virtual-window,
.chat-emote,
.chat-badge-img {
  transition: none !important;
  animation: none !important;
  filter: none !important;
}

#channels,
#globalTopGrid,
.logs-panel,
.emote-section { scroll-margin-top: 88px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 100;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #0d1118;
  color: var(--text);
  font-weight: 650;
  transition: opacity .14s ease, transform .14s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.site-footer {
  margin-top: 24px;
  padding-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: .86rem;
  font-weight: 560;
}

.site-footer a {
  color: #a991df;
  font-weight: 680;
  text-decoration: none;
}

.site-footer a:hover { color: #c7adff; }

.site-footer--simple {
  justify-content: center;
  gap: 14px;
}
.site-footer--simple strong {
  color: var(--text);
  font-weight: 760;
}

.footer-domain {
  color: var(--muted);
  font-weight: 650;
}

.footer-disclaimer {
  flex-basis: 100%;
  margin: -4px 0 0;
  color: var(--muted-2);
  font-size: .78rem;
  font-weight: 520;
  text-align: center;
}

/* responsive */

@media (max-width: 1150px) {
  .filters { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .global-top-podium { grid-template-columns: 1fr; }
  .day-user-item { grid-template-columns: 44px minmax(0, 1fr); }
  .day-user-count,
  .day-user-actions { grid-column: 2; justify-content: flex-start; }
}

@media (max-width: 920px) {
  .hub-hero,
  .landing,
  .logs-hero,
  .channel-hero,
  .emote-detail,
  .boards,
  .logs-user-grid { grid-template-columns: 1fr; }

  .logs-meta-row,
  .card__head,
  .logs-panel__head,
  .admin-top { align-items: stretch; flex-direction: column; }

  .logs-filters { justify-content: flex-start; }
}

@media (max-width: 760px) {
  :root { --log-row-height: 42px; }

  .view,
  .site-footer,
  .topbar,
  .admin-shell,
  .admin-shell--wide { width: min(100% - 20px, var(--container)); }

  .topbar { align-items: stretch; flex-direction: column; border-radius: 0 0 14px 14px; }
  .topbar__right { justify-content: flex-start; }
  .brand__logo,
  .brand__mark { width: 38px; height: 38px; }
  .top-link,
  .support-link,
  .live-chip { min-height: 34px; padding: 0 10px; font-size: .8rem; }

  .hub-hero,
  .landing,
  .logs-hero,
  .channel-hero,
  .emote-detail,
  .card,
  .logs-panel,
  .admin-card,
  .admin-top,
  .admin-login { padding: 16px; }

  .hub-hero { min-height: auto; }
  .hero-orb { min-height: 180px; }
  .hub-grid,
  .hub-strip,
  .stats-row,
  .channel-list,
  .global-grid,
  .emote-grid,
  .landing__panel { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .crumbs { align-items: flex-start; flex-direction: column; }
  .logs-filters label,
  .logs-filters input,
  .global-users-controls input { width: 100%; }
  .logs-day-actions,
  .global-users-controls { justify-content: flex-start; }
  .calendar-grid { gap: 5px; }
  .calendar-day { min-height: 54px; padding: 7px; border-radius: 12px; }

  .chat-log-list--terminal { height: min(620px, calc(100vh - 320px)); min-height: 330px; font-size: 12px; }
  .chat-line { grid-template-columns: 58px minmax(105px, 155px) 7px minmax(0, 1fr); gap: 5px; padding: 0 7px; }
  .chat-user-profile { display: none; }
  .chat-badge-img,
  .chat-badge-fallback { width: 15px; height: 15px; }
  .chat-emote { max-height: 28px; }
  #userLatestMessages .chat-row { grid-template-columns: 1fr; gap: 6px; }
  .admin-table { min-width: 680px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .view,
  .channel-tile,
  .global-card,
  .emote-card,
  .global-top-card,
  .day-user-item,
  .pop-in { animation: none !important; }
  *,
  *::before,
  *::after { transition-duration: .001ms !important; }
}

/* v2.0.0 — logo i favicon */
.hero-orb {
  padding: 18px;
  text-align: center;
}
.hero-orb__label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.home-top-emote {
  width: 168px;
  height: 118px;
  display: grid;
  place-items: center;
  margin: 4px auto 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
  overflow: hidden;
}
.home-top-emote.has-emote {
  border-color: rgba(145,70,255,.24);
  background: rgba(145,70,255,.08);
}
.home-top-emote img {
  max-width: 145px;
  max-height: 96px;
  object-fit: contain;
}
.home-top-emote__empty {
  color: var(--muted);
  font-size: 2rem;
  font-weight: 850;
}
.hero-orb strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.05;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-orb small {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.channel-list {
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 16px;
}
.channel-tile {
  min-height: 158px;
  gap: 12px;
  padding: 15px;
}
.channel-tile__numbers {
  gap: 8px;
}
.channel-tile__numbers span {
  padding: 10px;
}
.channel-tile__footer--split {
  padding-top: 2px;
}

.global-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}
.global-card {
  min-height: 158px;
  gap: 7px;
  padding: 14px;
}
.global-card__image {
  height: 58px;
}
.global-card__image img,
.global-card .emote-img {
  max-height: 56px;
}

.global-users-list,
.day-users-list {
  gap: 10px;
}
.global-top-podium {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.global-top-card {
  min-height: 0;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  align-content: start;
  gap: 8px 12px;
  padding: 16px;
}
.global-top-card__rank {
  width: 44px;
  height: 44px;
}
.global-top-card__count {
  grid-column: 2;
  margin-top: -2px;
}
.global-top-card__count strong {
  font-size: 1.65rem;
}
.global-top-card__meta,
.global-top-card__actions {
  gap: 7px;
}
.global-top-card__actions .text-button,
.day-user-actions .text-button {
  min-height: 34px;
  padding-inline: 12px;
}
.day-user-item {
  grid-template-columns: 50px minmax(0, 1fr) 108px auto;
  gap: 12px;
  padding: 13px 14px;
}
.day-user-rank {
  width: 42px;
  height: 42px;
}
.day-user-count strong {
  font-size: 1.16rem;
}

.logs-panel__head.global-users-head {
  margin-bottom: 16px;
}
.global-users-summary {
  margin-bottom: 12px;
}
.logs-panel--nested {
  padding: 18px;
}

.admin-table th {
  display: table-cell;
}
.admin-table {
  min-width: 900px;
  table-layout: fixed;
}
.admin-table th:nth-child(1),
.admin-table td:nth-child(1) { width: 24%; }
.admin-table th:nth-child(2),
.admin-table td:nth-child(2) { width: 16%; }
.admin-table th:nth-child(3),
.admin-table td:nth-child(3),
.admin-table th:nth-child(4),
.admin-table td:nth-child(4),
.admin-table th:nth-child(5),
.admin-table td:nth-child(5) { width: 13%; }
.admin-table th:nth-child(6),
.admin-table td:nth-child(6) { width: 21%; }
.admin-actions-cell {
  align-items: center;
}
.admin-actions-cell form {
  margin: 0;
}
.admin-table td {
  vertical-align: middle;
}

@media (max-width: 760px) {
  .home-top-emote {
    width: 145px;
    height: 104px;
  }
  .home-top-emote img {
    max-width: 124px;
    max-height: 84px;
  }
  .global-top-podium,
  .hub-hero,
  .landing,
  .logs-hero,
  .channel-hero,
  .emote-detail,
  .boards,
  .logs-user-grid {
    grid-template-columns: 1fr;
  }
  .day-user-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .day-user-count,
  .day-user-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}


/* v2.0.0 — homepage teksty i bardziej miękkie kafle */
.hub-strip article {
  border-radius: 20px;
}
.hub-strip small {
  max-width: 180px;
  line-height: 1.25;
}
.hub-card {
  border-radius: 28px;
}
.hub-card:hover {
  border-color: rgba(185, 195, 215, .28);
  background: #131a26;
}

/* v2.0.0 — admin channel delete + background emote refresh */
.mini-button--danger {
  border-color: rgba(255,95,122,.34);
  background: rgba(255,95,122,.09);
  color: #ffc3d0;
}
.mini-button--danger:hover {
  border-color: rgba(255,95,122,.58);
  background: rgba(255,95,122,.15);
  color: #fff;
}
.admin-refresh-note {
  flex-basis: 100%;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.35;
}
.admin-refresh-note.is-running { color: #b7d6ff; }
.admin-refresh-note.is-error { color: #ffc3d0; }

/* v2.0.9 — lekkie narzędzia: status bota, zakres topki, historia emotki */
.admin-section-head,
.admin-queue-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.admin-section-head h2,
.admin-queue-panel__head h3 { margin-bottom: 5px; }
.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
}
.admin-status-tile {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.026);
}
.admin-status-tile span,
.admin-queue-panel__head span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 760;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.admin-status-tile strong {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.08;
}
.admin-status-tile small {
  color: var(--muted);
  line-height: 1.35;
  font-weight: 610;
}
.admin-status-tile.is-ok { border-color: rgba(0,208,132,.28); background: rgba(0,208,132,.07); }
.admin-status-tile.is-warn { border-color: rgba(255,209,102,.28); background: rgba(255,209,102,.07); }
.admin-status-tile.is-bad { border-color: rgba(255,95,122,.28); background: rgba(255,95,122,.07); }
.admin-queue-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-3);
}
.admin-job-list { display: grid; gap: 8px; }
.admin-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}
.admin-job strong { display: block; }
.admin-job small { display: block; margin-top: 2px; color: var(--muted); }
.admin-job > span {
  flex: 0 0 auto;
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(145,70,255,.28);
  border-radius: 999px;
  color: #c7adff;
  font-size: .78rem;
  font-weight: 750;
}
.admin-job--running > span { border-color: rgba(0,208,132,.28); color: #bfffd0; }
.admin-queue-empty { color: var(--muted); font-weight: 650; }
.top-period-toggle { justify-content: flex-end; }
.emote-history {
  display: grid;
  grid-template-columns: repeat(14, minmax(42px, 1fr));
  gap: 8px;
  align-items: end;
}
.history-day {
  min-height: 138px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  align-items: end;
  justify-items: center;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}
.history-day__bar {
  width: 100%;
  height: var(--h);
  min-height: 5px;
  border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, rgba(145,70,255,.82), rgba(90,167,255,.58));
}
.history-day strong { font-size: .9rem; }
.history-day small { color: var(--muted); font-size: .72rem; font-weight: 650; }
@media (max-width: 760px) {
  .emote-history { grid-template-columns: repeat(7, minmax(40px, 1fr)); }
  .history-day { min-height: 108px; }
  .admin-status-grid { grid-template-columns: 1fr; }
}

/* v2.1.2 — drobne poprawki tekstów */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 20px;
}
.about-hero > div,
.about-card,
.about-note {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}
.about-hero > div {
  padding: clamp(22px, 4vw, 42px);
}
.about-hero h1 { margin-bottom: 14px; }
.about-hero p { max-width: 760px; font-size: 1.03rem; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.about-card {
  padding: 20px;
}
.about-card--highlight {
  display: grid;
  align-content: end;
  min-height: 280px;
  background: #121926;
}
.about-card span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 780;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.about-card strong {
  display: block;
  margin-bottom: 9px;
  color: var(--text);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -.04em;
}
.about-card h2 { font-size: 1.25rem; }
.about-card a {
  color: #c7adff;
  font-weight: 760;
  text-decoration: none;
}
.about-note {
  margin-top: 14px;
  padding: 22px;
  background: var(--panel-3);
}
.about-note p {
  max-width: 900px;
  margin-bottom: 0;
}
.admin-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.admin-mini-meta span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.026);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 720;
}
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .45fr);
  gap: 16px;
  align-items: stretch;
}
.admin-card--action {
  min-height: 100%;
}
.admin-channel-card h2 {
  margin-bottom: 14px;
}
.admin-table tbody tr:hover td {
  background: rgba(255,255,255,.018);
}
.admin-table td:first-child strong {
  font-size: 1rem;
}
.admin-table td:first-child span {
  display: inline-flex;
  margin-top: 3px;
}
.admin-actions-cell .mini-button {
  min-height: 32px;
}
@media (max-width: 860px) {
  .about-hero,
  .about-grid,
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .about-card--highlight {
    min-height: 190px;
  }
}


/* v2.1.3 — czytelniejszy admin: status kanałów i ostatnie odświeżenia */
.admin-top__actions {
  justify-content: flex-end;
}
.admin-table--channels {
  min-width: 1160px;
}
.admin-table--channels th:nth-child(1),
.admin-table--channels td:nth-child(1) { width: 20%; }
.admin-table--channels th:nth-child(2),
.admin-table--channels td:nth-child(2) { width: 12%; }
.admin-table--channels th:nth-child(3),
.admin-table--channels td:nth-child(3),
.admin-table--channels th:nth-child(4),
.admin-table--channels td:nth-child(4) { width: 10%; }
.admin-table--channels th:nth-child(5),
.admin-table--channels td:nth-child(5) { width: 24%; }
.admin-table--channels th:nth-child(6),
.admin-table--channels td:nth-child(6) { width: 11%; }
.admin-table--channels th:nth-child(7),
.admin-table--channels td:nth-child(7) { width: 13%; }
.admin-channel-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.admin-channel-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 13px;
  object-fit: cover;
  background: var(--panel-3);
  border: 1px solid var(--line);
}
.admin-number-cell strong {
  color: var(--text);
  font-size: 1.05rem;
}
.admin-number-cell span,
.admin-last-cell span,
.admin-status-hint {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.35;
}
.admin-last-cell span + span {
  margin-top: 3px;
}
.admin-status-hint {
  margin-top: 6px;
}
.status-pill--is-ok {
  border-color: rgba(0,208,132,.28);
  background: rgba(0,208,132,.09);
  color: #bfffd0 !important;
}
.status-pill--is-warn {
  border-color: rgba(255,209,102,.28);
  background: rgba(255,209,102,.09);
  color: #ffe0a3 !important;
}
.status-pill--is-bad {
  border-color: rgba(255,95,122,.28);
  background: rgba(255,95,122,.09);
  color: #ffc3d0 !important;
}
.status-pill--is-muted,
.status-pill--is-soft {
  border-color: var(--line);
  background: rgba(255,255,255,.035);
  color: var(--muted) !important;
}
@media (max-width: 760px) {
  .admin-top__actions {
    justify-content: flex-start;
  }
}


/* v2.1.8 — poprawki logów */
.admin-success {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-success::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0,208,132,.16);
  color: #bfffd0;
}

/* v2.1.8 — wyróżnienie dzisiejszego dnia w kalendarzu logów */

/* v2.1.8 — publiczny changelog */
.changelog-hero { margin-bottom: 14px; }
.changelog-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.changelog-item {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 18px;
}
.changelog-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.changelog-item__meta span,
.changelog-item__meta time {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.028);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 720;
}
.changelog-item h2 {
  margin-bottom: 8px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}
.changelog-item p {
  max-width: 840px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}
.admin-changelog-card textarea {
  width: 100%;
  resize: vertical;
  min-height: 92px;
}
.admin-changelog-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.admin-changelog-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.022);
}
.admin-changelog-entry-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.admin-changelog-list form {
  margin: 0;
  align-self: center;
}
.admin-changelog-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-changelog-list span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 720;
  white-space: nowrap;
}

/* v2.2.1 — admin changelog, backup i prostsza stopka */
.admin-changelog-card select,
.admin-changelog-edit-form select {
  min-height: 42px;
}
.admin-changelog-preview {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.026);
}
.admin-changelog-preview span,
.changelog-kind {
  width: fit-content;
  border-color: rgba(167,139,250,.32) !important;
  background: rgba(167,139,250,.11) !important;
  color: #d9ccff !important;
}
.admin-changelog-preview strong {
  color: var(--text);
  font-size: 1.02rem;
}
.admin-changelog-preview p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.admin-changelog-entry-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-edit-details {
  position: relative;
}
.admin-edit-details summary {
  list-style: none;
  cursor: pointer;
}
.admin-edit-details summary::-webkit-details-marker { display: none; }
.admin-changelog-edit-form {
  min-width: min(420px, 82vw);
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0c1017;
}
.admin-backup-last {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  margin: 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.026);
}
.admin-backup-last span,
.admin-backup-last small {
  color: var(--muted);
  font-weight: 680;
}
.admin-backup-last strong {
  color: var(--text);
  font-size: 1.15rem;
}
@media (max-width: 720px) {
  .admin-changelog-list li,
  .admin-changelog-entry-actions {
    display: grid;
    justify-content: stretch;
  }
}


/* v2.2.3 — feedback */
.feedback-hero { margin-bottom: 14px; }
.feedback-card {
  max-width: 780px;
  margin: 14px auto 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}
.feedback-form {
  display: grid;
  gap: 14px;
}
.feedback-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 760;
}
.feedback-form label span small {
  color: var(--muted-2);
  font-weight: 650;
}
.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  font: inherit;
}
.feedback-form textarea {
  resize: vertical;
  min-height: 140px;
}
.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus {
  border-color: rgba(167,139,250,.44);
  box-shadow: 0 0 0 3px rgba(167,139,250,.10);
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.feedback-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 760;
}
.feedback-status--ok { color: #8ff0b4; }
.feedback-status--error { color: #ff9aa8; }
.admin-feedback-card {
  grid-column: span 2;
}
.admin-feedback-count {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(167,139,250,.3);
  border-radius: 999px;
  color: #d9ccff;
  background: rgba(167,139,250,.10);
  font-size: .82rem;
  font-weight: 820;
  white-space: nowrap;
}
.admin-feedback-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.admin-feedback-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.022);
}
.admin-feedback-item.is-new {
  border-color: rgba(143,240,180,.28);
  background: rgba(143,240,180,.045);
}
.admin-feedback-entry-text {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.admin-feedback-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.admin-feedback-entry-meta span,
.admin-feedback-entry-meta time {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 820;
}
.admin-feedback-entry-text p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
}
.admin-feedback-entry-text small,
.admin-feedback-empty span {
  color: var(--muted);
  font-weight: 700;
}
.admin-feedback-entry-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-feedback-entry-actions form { margin: 0; }
@media (max-width: 960px) {
  .admin-feedback-card { grid-column: span 1; }
}
@media (max-width: 720px) {
  .admin-feedback-list li,
  .admin-feedback-entry-actions {
    display: grid;
    justify-content: stretch;
  }
}

/* v2.2.3 — feedback custom select */
.feedback-form select {
  color-scheme: dark;
}
.feedback-kind {
  position: relative;
  width: 100%;
}
.feedback-kind__button {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}
.feedback-kind__button:hover {
  border-color: rgba(167,139,250,.34);
  background: rgba(255,255,255,.055);
}
.feedback-kind__button:focus-visible {
  outline: none;
  border-color: rgba(167,139,250,.54);
  box-shadow: 0 0 0 3px rgba(167,139,250,.12);
}
.feedback-kind__menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  padding: 7px;
  border: 1px solid rgba(167,139,250,.26);
  border-radius: 16px;
  background: #121824;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}
.feedback-kind__menu button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.feedback-kind__menu button:hover,
.feedback-kind__menu button[aria-selected="true"] {
  background: rgba(167,139,250,.16);
  color: #ffffff;
}
.feedback-kind.is-open .feedback-kind__button {
  border-color: rgba(167,139,250,.54);
  box-shadow: 0 0 0 3px rgba(167,139,250,.10);
}


/* v2.2.4 — czystszy admin panel i normalne powiadomienia */
.admin-tabs {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(12,16,23,.82);
  backdrop-filter: blur(14px);
}
.admin-tabs a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: var(--soft);
  font-weight: 780;
  text-decoration: none;
}
.admin-tabs a:hover {
  border-color: rgba(167,139,250,.28);
  color: #e9ddff;
  background: rgba(167,139,250,.10);
}
.admin-section {
  scroll-margin-top: 88px;
  margin-bottom: 22px;
}
.admin-section-title {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
}
.admin-section-title span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 860;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.admin-section-title h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
}
.admin-section-title p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}
.admin-section .admin-card h3 {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}
.admin-section .admin-card > p {
  margin-top: 0;
}
.admin-channel-form-card,
.admin-backup-card {
  max-width: none;
}
.admin-channel-card h3 {
  margin-bottom: 14px;
}
.admin-feedback-card,
.admin-changelog-card {
  grid-column: auto;
}
.admin-notice {
  position: sticky;
  top: 76px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 13px 15px;
  border-radius: 16px;
  font-weight: 760;
  box-shadow: 0 18px 45px rgba(0,0,0,.28);
}
.admin-notice::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.admin-notice--success {
  border: 1px solid rgba(0,208,132,.28);
  background: rgba(10,40,32,.94);
  color: #caffd7;
}
.admin-notice--success::before {
  background: rgba(0,208,132,.18);
  color: #bfffd0;
}
.admin-notice--error {
  border: 1px solid rgba(255,95,122,.32);
  background: rgba(47,18,25,.94);
  color: #ffd0da;
}
.admin-notice--error::before {
  content: "!";
  background: rgba(255,95,122,.18);
  color: #ffc3d0;
}
.admin-status-card {
  margin-bottom: 0;
}
.admin-channel-form-card + .admin-channel-card {
  margin-top: 16px;
}
.admin-table-wrap {
  border-radius: 16px;
}
@media (max-width: 720px) {
  .admin-tabs {
    position: static;
  }
  .admin-tabs a {
    flex: 1 1 auto;
  }
  .admin-notice {
    position: static;
  }
}

/* v2.2.5-dev — mobile polish / responsive cleanup */
html {
  -webkit-text-size-adjust: 100%;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(145,70,255,.18);
}

.topbar__toggle {
  display: none;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.04);
  color: var(--soft);
  cursor: pointer;
}

.topbar__toggle span {
  width: 17px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  transition: transform .16s ease, opacity .16s ease;
}

.topbar__toggle strong {
  margin-left: 6px;
  font-size: .78rem;
  font-weight: 800;
}

.topbar.is-open .topbar__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.topbar.is-open .topbar__toggle span:nth-child(2) { opacity: 0; }
.topbar.is-open .topbar__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.admin-table-wrap,
.logs-channel-menu,
.chat-log-list--terminal,
#userLatestMessages,
.admin-tabs {
  -webkit-overflow-scrolling: touch;
}

@media (hover: none) {
  .hub-card:hover,
  .channel-tile:hover,
  .global-card:hover,
  .emote-card:hover,
  .global-top-card:hover,
  .day-user-item:hover,
  .user-emote-card:hover,
  .user-day-item:hover,
  .calendar-day:hover,
  .rank-item:hover {
    transform: none;
  }
}

@media (max-width: 760px) {
  :root { --log-row-height: 46px; }

  body { overflow-x: hidden; }
  .app { padding-bottom: 18px; }

  .view,
  .site-footer,
  .topbar,
  .admin-shell,
  .admin-shell--wide {
    width: min(100% - 18px, var(--container));
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2rem, 12vw, 3rem);
    line-height: 1;
    letter-spacing: -.05em;
  }

  h2 { font-size: clamp(1.28rem, 7vw, 1.72rem); }

  p { line-height: 1.48; }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 9px;
  }

  .brand { gap: 9px; }
  .brand__text strong { font-size: .95rem; }
  .brand__text small { font-size: .72rem; }

  .topbar__toggle { display: inline-flex; }

  .topbar__right {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    padding-top: 3px;
  }

  .topbar.is-open .topbar__right { display: grid; }

  .topbar__right .top-link,
  .topbar__right .support-link,
  .topbar__right .live-chip {
    width: 100%;
    min-height: 42px;
    justify-content: center;
    padding-inline: 10px;
  }

  .topbar__right .support-link,
  .topbar__right .live-chip {
    grid-column: span 1;
  }

  .hero-actions .button,
  .landing__actions .button,
  .detail-actions .button,
  .crumbs__actions .text-button,
  .logs-user-actions .button,
  .admin-top__actions .button,
  .admin-top__actions form,
  .admin-top__actions button {
    width: 100%;
  }

  .hero-actions,
  .landing__actions,
  .detail-actions,
  .crumbs__actions,
  .logs-user-actions,
  .admin-top__actions {
    align-items: stretch;
  }

  .hub-strip article,
  .stat,
  .mini-board {
    min-height: 104px;
  }

  .hub-card,
  .channel-tile,
  .global-card,
  .emote-card,
  .global-top-card,
  .day-user-item,
  .user-emote-card,
  .user-day-item {
    border-radius: 15px;
  }

  .filters,
  .logs-filters,
  .global-users-controls,
  .admin-form--grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .logs-picker {
    display: grid;
    gap: 9px;
  }

  .logs-channel-menu {
    left: 0;
    right: 0;
    top: calc(100% + 5px);
    max-height: min(360px, 55vh);
  }

  .logs-meta-row--toolbar {
    gap: 8px;
  }

  .logs-meta,
  .logs-active-filter,
  .logs-loading,
  .global-users-summary {
    width: 100%;
    font-size: .84rem;
  }

  .logs-day-actions,
  .global-users-controls {
    width: 100%;
  }

  .logs-day-actions {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 0 4px;
    scrollbar-width: thin;
  }

  .logs-day-actions .text-button {
    flex: 0 0 auto;
    min-height: 38px;
    white-space: nowrap;
  }

  .logs-active-filter.is-visible {
    display: grid;
    align-items: stretch;
  }

  .logs-active-filter__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .month-controls {
    width: 100%;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .month-controls strong {
    min-width: 0;
    align-self: center;
    font-size: .9rem;
  }

  .calendar-grid { gap: 4px; }
  .calendar-weekday {
    padding-inline: 2px;
    text-align: center;
    font-size: .66rem;
  }

  .calendar-day {
    min-height: 58px;
    padding: 7px 5px;
    border-radius: 11px;
    text-align: center;
  }

  .calendar-day strong { font-size: .92rem; }
  .calendar-day span { font-size: .66rem; }
  .calendar-day__today {
    justify-self: center;
    padding: 2px 5px;
    font-size: .58rem;
  }

  .chat-log-list--terminal {
    height: min(64vh, 620px);
    min-height: 360px;
    border-radius: 13px;
    font-size: 11.7px;
  }

  .chat-line {
    grid-template-columns: 52px minmax(86px, 118px) minmax(0, 1fr);
    gap: 6px;
    padding: 0 8px;
  }

  .chat-line-separator { display: none; }
  .chat-line-time { font-size: 10.5px; }
  .chat-line-author { gap: 4px; }
  .chat-user,
  .chat-user-static { font-size: 11.5px; }
  .chat-line-message { font-size: 11.7px; }
  .chat-emote { max-width: 86px; max-height: 30px; }

  .global-top-card {
    min-height: auto;
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 13px;
  }

  .global-top-card__rank,
  .day-user-rank {
    width: 38px;
    height: 38px;
  }

  .day-user-item {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
  }

  .day-user-count,
  .day-user-actions {
    grid-column: 2;
  }

  .day-user-actions .text-button,
  .admin-actions-cell .mini-button,
  .admin-actions-cell form {
    width: 100%;
  }

  .admin-top {
    gap: 12px;
  }

  .admin-mini-meta {
    justify-content: flex-start;
  }

  .admin-tabs {
    position: sticky;
    top: 8px;
    z-index: 25;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-radius: 16px;
    padding: 8px;
    scroll-snap-type: x proximity;
  }

  .admin-tabs a {
    flex: 0 0 auto;
    min-height: 38px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .admin-notice {
    position: static;
    align-items: flex-start;
  }

  .admin-table-wrap {
    margin-inline: -4px;
    padding-bottom: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.018);
  }

  .admin-table {
    min-width: 720px;
  }

  .admin-table--channels {
    min-width: 1080px;
  }

  .admin-table th,
  .admin-table td {
    padding: 11px 9px;
  }

  .admin-channel-avatar {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .admin-job {
    grid-template-columns: 1fr;
  }

  .admin-job > span {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  :root { --log-row-height: 48px; }

  .view,
  .site-footer,
  .topbar,
  .admin-shell,
  .admin-shell--wide {
    width: min(100% - 14px, var(--container));
  }

  .topbar__right {
    grid-template-columns: 1fr;
  }

  .topbar__toggle strong {
    display: none;
  }

  .hub-hero,
  .landing,
  .logs-hero,
  .channel-hero,
  .emote-detail,
  .card,
  .logs-panel,
  .admin-card,
  .admin-top,
  .admin-login,
  .feedback-card,
  .changelog-item {
    padding: 14px;
  }

  .top-link,
  .support-link,
  .live-chip,
  .text-button,
  .button,
  .toggle,
  .mini-button,
  .logs-channel-button,
  .module-badge,
  .back-link,
  .channel-pill {
    min-height: 42px;
  }

  .toggle-group,
  .top-period-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toggle-group .toggle,
  .top-period-toggle .toggle {
    width: 100%;
  }

  .chat-log-list--terminal {
    height: min(66vh, 620px);
    min-height: 380px;
    font-size: 11.3px;
  }

  .chat-line {
    grid-template-columns: 48px minmax(72px, 92px) minmax(0, 1fr);
    gap: 5px;
    padding-inline: 7px;
  }

  .chat-badges { display: none; }
  .chat-user,
  .chat-user-static { font-size: 11px; }
  .chat-line-message { font-size: 11.3px; }
  .chat-emote { max-width: 72px; max-height: 28px; }

  .calendar-day {
    min-height: 52px;
    padding: 6px 3px;
  }

  .calendar-day span {
    display: none;
  }

  .calendar-day.has-logs span,
  .calendar-day--today span {
    display: block;
  }

  .logs-active-filter__actions,
  .global-users-controls,
  .admin-form--grid,
  .admin-changelog-list li,
  .admin-feedback-list li {
    grid-template-columns: 1fr;
  }

  .admin-changelog-edit-form {
    min-width: 0;
    width: 100%;
  }
}

/* v2.2.6-dev — baza poprawki mobile menu + czytelniejsze logi na telefonie */
@media (max-width: 760px) {
  :root { --log-row-height: 68px; }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
    padding: 8px;
    overflow: visible;
    border-radius: 0 0 18px 18px;
    background: rgba(11, 15, 22, .72);
    border-color: rgba(255,255,255,.10);
    box-shadow: 0 14px 40px rgba(0,0,0,.28);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
  }

  .topbar__toggle {
    width: 44px;
    height: 44px;
    min-height: 44px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border-radius: 15px;
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.035);
    color: rgba(234,240,251,.88);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  }

  .topbar__toggle:hover,
  .topbar__toggle:focus-visible {
    border-color: rgba(145,70,255,.42);
    background: rgba(145,70,255,.12);
    outline: none;
  }

  .topbar__toggle strong { display: none; }

  .topbar__toggle span {
    width: 18px;
    height: 2px;
    margin: 0;
    transform-origin: center;
  }

  .topbar.is-open .topbar__toggle {
    border-color: rgba(145,70,255,.50);
    background: rgba(145,70,255,.16);
  }

  .topbar.is-open .topbar__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .topbar.is-open .topbar__toggle span:nth-child(2) { opacity: 0; transform: scaleX(.45); }
  .topbar.is-open .topbar__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .topbar__right {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    background: rgba(12, 16, 24, .78);
    box-shadow: 0 24px 70px rgba(0,0,0,.42);
    backdrop-filter: blur(18px) saturate(1.12);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(.985);
    transform-origin: top center;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }

  .topbar.is-open .topbar__right {
    display: grid;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .topbar__right .top-link,
  .topbar__right .support-link,
  .topbar__right .live-chip {
    min-height: 46px;
    border-radius: 15px;
    background: rgba(255,255,255,.045);
  }

  .topbar__right .top-link.is-active {
    box-shadow: 0 10px 22px rgba(145,70,255,.20);
  }

  .logs-panel,
  .logs-hero,
  .logs-meta-row,
  .logs-day-head,
  .logs-panel__head {
    min-width: 0;
  }

  .logs-day-head {
    gap: 12px;
  }

  .logs-filters {
    width: 100%;
    gap: 8px;
  }

  .logs-filters label {
    min-width: 0;
  }

  .logs-meta-row--toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .logs-day-actions {
    margin-inline: -2px;
    padding: 0 2px 6px;
    mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 26px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 26px), transparent 100%);
  }

  .logs-day-actions .text-button {
    min-height: 42px;
    border-radius: 14px;
    background: rgba(255,255,255,.045);
  }

  .chat-log-list--terminal {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: min(68vh, 660px);
    min-height: 390px;
    border-radius: 16px;
    background: rgba(4, 7, 12, .96);
    contain: strict;
  }

  .chat-line {
    height: var(--log-row-height);
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "author time"
      "message message";
    align-content: center;
    align-items: center;
    gap: 5px 10px;
    padding: 8px 10px;
  }

  .chat-line-time {
    grid-area: time;
    justify-self: end;
    color: #7f8da6;
    font-size: 10.5px;
  }

  .chat-line-author {
    grid-area: author;
    min-width: 0;
    overflow: hidden;
  }

  .chat-line-profile,
  .chat-line-separator {
    display: none;
  }

  .chat-user,
  .chat-user-static {
    max-width: 100%;
    font-size: 12.2px;
  }

  .chat-badges {
    max-width: 46px;
    overflow: hidden;
  }

  .chat-badge-img,
  .chat-badge-fallback {
    width: 15px;
    height: 15px;
  }

  .chat-line-message {
    grid-area: message;
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
    color: #edf3ff;
    font-size: 12.8px;
    line-height: 1.28;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-emote-link {
    flex: 0 0 auto;
  }

  .chat-emote {
    max-width: 84px;
    max-height: 31px;
  }
}

@media (max-width: 560px) {
  :root { --log-row-height: 72px; }

  .topbar {
    width: min(100% - 12px, var(--container));
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 7px;
  }

  .topbar__toggle {
    width: 42px;
    height: 42px;
    min-height: 42px;
    border-radius: 14px;
  }

  .topbar__right {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px;
    border-radius: 17px;
  }

  .topbar__right .top-link,
  .topbar__right .support-link,
  .topbar__right .live-chip {
    min-height: 44px;
  }

  .logs-filters {
    grid-template-columns: 1fr;
  }

  .logs-filters .button,
  .logs-filters label,
  .logs-filters input {
    width: 100%;
  }

  .chat-log-list--terminal {
    height: min(70vh, 680px);
    min-height: 410px;
    font-size: 12px;
  }

  .chat-line {
    padding: 8px 9px;
    gap: 5px 8px;
  }

  .chat-user,
  .chat-user-static {
    font-size: 12px;
  }

  .chat-line-message {
    font-size: 12.5px;
  }

  .chat-emote {
    max-width: 78px;
    max-height: 30px;
  }
}

@media (max-width: 380px) {
  .brand__text small { display: none; }
  .chat-line-time { font-size: 10px; }
  .chat-user,
  .chat-user-static { font-size: 11.6px; }
  .chat-line-message { font-size: 12px; }
  .chat-emote { max-width: 72px; }
}

/* v1.0.0 — poprawki menu, poziomy scroll logów i mobile about */
:root {
  --chat-log-min-width: 1120px;
}

.chat-log-list--terminal {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
}

.chat-virtual-spacer,
.chat-virtual-window,
.chat-line {
  min-width: max(100%, var(--chat-log-min-width));
}

.chat-line {
  grid-template-columns: 74px minmax(150px, 220px) 10px minmax(620px, 1fr);
}

.chat-line-message {
  overflow: visible;
  text-overflow: clip;
}

.topbar__toggle {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.topbar__toggle:active {
  transform: scale(.98);
}

@media (max-width: 760px) {
  :root {
    --log-row-height: 70px;
    --chat-log-min-width: 780px;
  }

  .topbar {
    background: rgba(11, 15, 22, .88);
  }

  .topbar__toggle {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    outline: none;
  }

  .topbar__toggle:focus,
  .topbar__toggle:focus-visible {
    outline: none;
  }

  .topbar__right {
    left: auto;
    right: 0;
    width: min(330px, calc(100vw - 22px));
    grid-template-columns: 1fr;
    padding: 9px;
    border-color: rgba(255,255,255,.12);
    background: rgba(12, 16, 24, .96);
    box-shadow: 0 22px 55px rgba(0,0,0,.46);
    backdrop-filter: blur(14px) saturate(1.08);
    -webkit-backdrop-filter: blur(14px) saturate(1.08);
  }

  .topbar__right .top-link,
  .topbar__right .support-link,
  .topbar__right .live-chip {
    background: rgba(255,255,255,.035);
    box-shadow: none;
  }

  .topbar__right .top-link.is-active {
    box-shadow: none;
  }

  .chat-log-list--terminal {
    overflow: auto;
    contain: layout paint style;
  }

  .chat-virtual-spacer,
  .chat-virtual-window,
  .chat-line {
    min-width: var(--chat-log-min-width);
  }

  .chat-line {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "author time"
      "message message";
    padding: 8px 11px;
  }

  .chat-line-message {
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

  .chat-emote {
    flex: 0 0 auto;
  }

  .about-hero {
    gap: 12px;
    margin-top: 12px;
  }

  .about-hero > div,
  .about-card,
  .about-note {
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
  }

  .about-hero > div {
    padding: 18px;
  }

  .about-hero h1 {
    max-width: 100%;
    font-size: clamp(2rem, 9vw, 2.7rem);
    line-height: 1.02;
    letter-spacing: -.045em;
    overflow-wrap: normal;
    word-break: normal;
  }

  .about-hero p {
    max-width: 100%;
    font-size: .96rem;
  }

  .about-grid {
    gap: 10px;
    margin-top: 12px;
  }

  .about-card {
    padding: 16px;
  }

  .about-card--highlight {
    min-height: auto;
    align-content: start;
  }

  .about-card span {
    margin-bottom: 9px;
  }

  .about-card strong {
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }

  .about-note {
    padding: 16px;
  }
}

@media (max-width: 560px) {
  :root {
    --log-row-height: 72px;
    --chat-log-min-width: 720px;
  }

  .topbar__right {
    width: min(300px, calc(100vw - 18px));
  }

  .about-hero h1 {
    font-size: clamp(1.85rem, 8.6vw, 2.35rem);
  }
}

@media (max-width: 380px) {
  :root {
    --log-row-height: 70px;
    --chat-log-min-width: 680px;
  }

  .about-hero h1 {
    font-size: clamp(1.72rem, 8.2vw, 2.05rem);
  }
}

.chat-log-list--terminal.chat-log-list--virtual {
  contain: layout paint style;
}


/* v1.0.0 — poprawki: pewny scroll X logów, badge dziś nad liczbą, landing CTA niżej */
:root {
  --chat-log-min-width: 1520px;
}

.chat-log-list--terminal {
  overflow-x: scroll !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable both-edges;
  contain: layout paint style;
}

.chat-virtual-spacer,
.chat-virtual-window,
.chat-line {
  width: max(100%, var(--chat-log-min-width));
  min-width: max(100%, var(--chat-log-min-width));
  max-width: none;
}

.chat-line {
  grid-template-columns: 74px minmax(150px, 220px) 10px minmax(1000px, 1fr);
}

.chat-line-message {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap;
}

.calendar-day {
  grid-template-rows: auto auto 1fr;
  align-content: start;
}

.calendar-day__today {
  order: 2;
  margin-top: 6px;
  margin-bottom: 5px;
}

.calendar-day span {
  order: 3;
}

.landing {
  align-items: stretch;
}

.landing__copy {
  min-width: 0;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.landing__copy p {
  max-width: 760px;
}

.landing__actions {
  margin-top: auto;
  padding-top: 28px;
}

@media (min-width: 761px) {
  .landing__actions {
    align-self: start;
  }
}

@media (max-width: 760px) {
  :root {
    --chat-log-min-width: 920px;
  }

  .chat-log-list--terminal {
    overflow-x: scroll !important;
    overflow-y: auto !important;
    contain: layout paint style;
  }

  .chat-virtual-spacer,
  .chat-virtual-window,
  .chat-line {
    width: var(--chat-log-min-width);
    min-width: var(--chat-log-min-width);
  }

  .chat-line {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "author time"
      "message message";
  }

  .chat-line-message {
    min-width: 0;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap;
  }

  .landing__copy {
    min-height: auto;
  }

  .landing__actions {
    margin-top: 22px;
    padding-top: 0;
  }
}

@media (max-width: 560px) {
  :root {
    --chat-log-min-width: 860px;
  }
}

@media (max-width: 380px) {
  :root {
    --chat-log-min-width: 820px;
  }
}

/* v1.0.0 — hotfix: log scroll tylko wewnątrz panelu + kalendarz */
:root {
  --chat-log-scroll-width: 1900px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.view,
.app,
.logs-shell,
.logs-panel,
.logs-panel--nested,
.logs-panel__head,
.logs-day-head,
.logs-meta-row,
.logs-meta-row--toolbar,
.logs-meta,
.logs-day-actions,
.card,
.topbar,
.site-footer {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#logsDayPanel {
  overflow: hidden;
}

#chatLogList.chat-log-list--terminal {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  overflow-x: auto !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
  contain: layout paint style;
}

#chatLogList .chat-virtual-spacer,
#chatLogList .chat-virtual-window,
#chatLogList .chat-line {
  width: max(100%, var(--chat-log-scroll-width)) !important;
  min-width: max(100%, var(--chat-log-scroll-width)) !important;
  max-width: none !important;
  box-sizing: border-box;
}

#chatLogList .chat-virtual-window {
  left: 0 !important;
  right: auto !important;
}

#chatLogList .chat-line {
  grid-template-columns: 74px minmax(150px, 220px) 10px minmax(1250px, 1fr);
}

#chatLogList .chat-line-message {
  min-width: 0;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap;
}

.calendar-day {
  grid-template-rows: auto 1fr auto auto !important;
  align-content: stretch !important;
}

.calendar-day strong {
  order: 1;
  align-self: start;
}

.calendar-day__today {
  order: 3;
  align-self: end;
  margin-top: 0 !important;
  margin-bottom: 5px;
}

.calendar-day span {
  order: 4;
  align-self: end;
}

.calendar-day.has-logs:not(.calendar-day--today) span {
  margin-top: auto;
}

@media (max-width: 760px) {
  :root {
    --chat-log-scroll-width: 920px;
  }

  .logs-day-actions {
    max-width: 100%;
  }

  #chatLogList .chat-line {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "author time"
      "message message";
  }

  .calendar-day {
    grid-template-rows: auto 1fr auto auto !important;
  }

  .calendar-day__today {
    justify-self: center;
    margin-bottom: 4px;
  }
}

@media (max-width: 560px) {
  :root {
    --chat-log-scroll-width: 860px;
  }

  .calendar-day span {
    display: none;
  }

  .calendar-day.has-logs span,
  .calendar-day--today span {
    display: block;
    font-size: .61rem;
  }
}

@media (max-width: 380px) {
  :root {
    --chat-log-scroll-width: 820px;
  }
}
