/* Кабінет організатора: той самий світ, спокійніше й щільніше. LED лише для ключових чисел. */

.page-admin { background: var(--ground); }

.abar {
  position: sticky; top: 0; z-index: 30;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  height: 4rem;
  padding: 0 1.8rem;
  background: #0a0909;
  border-bottom: 1px solid var(--rule);
}
.abar__mark { font-size: 1.45rem; }
.abar__title { margin: 0; font-family: var(--f-ui); font-weight: 500; font-size: 1.15rem; line-height: 1.2; padding-left: 1.4rem; border-left: 1px solid var(--rule-2); }
.abar__season { font-family: var(--f-ui); font-size: 1rem; color: var(--ink-2); }
.abar__demo {
  font-family: var(--f-ui); font-size: 0.92rem; color: var(--amber);
  padding: 0.3rem 0.6rem; border: 1px solid rgba(245, 179, 31, 0.4); border-radius: 0.3rem;
}
.abar__user { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; }
.abar__av {
  display: grid; place-items: center;
  width: 2.3rem; height: 2.3rem;
  font-family: var(--f-ui); font-weight: 600; font-size: 0.9rem;
  color: var(--ground); background: var(--ink-2); border-radius: 50%;
}
.abar__name { display: flex; flex-direction: column; font-size: 0.95rem; line-height: 1.2; }
.abar__name small { font-size: 0.8rem; color: var(--ink-3); }
.abar__site { min-height: 40px; font-size: 1rem; padding: 0 1rem; }

.adm { padding: 1.8rem 1.8rem 3rem; max-width: 100rem; margin: 0 auto; }
.adm__h { font-family: var(--f-ui); font-weight: 500; font-size: 1.15rem; color: var(--ink-2); margin-bottom: 0.9rem; }
.adm__note { margin-top: 1rem; }

/* ------------------------------------------------ KPI */
.kpi {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  background: #0a0909;
  border: 1px solid var(--rule);
  border-radius: 0.3rem;
  overflow: hidden;
}
.kpi__c { padding: 1.2rem 1.3rem 1.1rem; background: var(--ground-2); }
.kpi__k { font-family: var(--f-ui); font-size: 0.95rem; color: var(--ink-3); }
.kpi__v { display: flex; align-items: baseline; gap: 0.6rem; margin-top: 0.7rem; }
.kpi__v .led { font-size: 2.6rem; letter-spacing: 0.04em; }
.kpi__of { font-family: var(--f-ui); font-size: 1rem; color: var(--ink-2); }
.kpi__d { margin-top: 0.55rem; font-size: 0.86rem; color: var(--ink-2); }

/* ------------------------------------------------ дошка подій */
.board { margin-top: 2rem; }
.board__rows { border-top: 1px solid var(--rule); }
.board__row {
  --ev: var(--amber);
  display: grid;
  grid-template-columns: minmax(10rem, 1.4fr) 7.5rem minmax(9rem, 1fr) minmax(10rem, 1.3fr) minmax(9rem, 1.1fr) 8.5rem;
  align-items: center;
  gap: 1.4rem;
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid var(--rule);
}
.board__row--head { padding: 0.6rem 0.4rem; font-family: var(--f-ui); font-size: 0.88rem; color: var(--ink-3); }
.board__ev { display: flex; align-items: center; gap: 0.6rem; font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; }
.board__ev::before { content: ''; width: 3rem; height: 2rem; background: var(--thumb, var(--amber)) var(--thumb-pos, center) / cover; border-radius: 2px; flex: none; }
.board__row .led { font-size: 1.75rem; letter-spacing: 0.04em; }
.board__row small { display: block; margin-top: 0.25rem; font-size: 0.8rem; color: var(--ink-3); }
.board__row--past .board__ev { color: var(--ink-2); }
.waves { display: flex; flex-wrap: wrap; gap: 2px; }
.waves i { display: block; height: 0.55rem; width: var(--w); background: var(--amber); }
.waves i:nth-child(2) { background: #c98f18; }
.waves i:nth-child(3) { background: #8a6310; }
.waves small { width: 100%; }
.occ__bar { display: block; height: 0.55rem; background: rgba(246, 246, 244, 0.08); }
.occ__bar i { display: block; height: 100%; width: var(--w); background: var(--amber); }
.st { justify-self: start; font-family: var(--f-ui); font-size: 0.95rem; padding: 0.25rem 0.6rem; border-radius: 0.3rem; border: 1px solid var(--rule-2); }
.st--open { color: var(--amber); border-color: rgba(245, 179, 31, 0.45); }
.st--early { color: var(--ink); }
.st--done { color: var(--ink-3); }

/* ------------------------------------------------ вкладки */
.tabs { display: flex; gap: 0.4rem; margin-top: 2.4rem; border-bottom: 1px solid var(--rule); }
.tabs__b {
  position: relative;
  min-height: 48px;
  padding: 0 1.1rem;
  font-family: var(--f-ui); font-weight: 500; font-size: 1.2rem;
  color: var(--ink-3);
}
.tabs__b:hover { color: var(--ink); }
.tabs__b.is-on { color: var(--ink); }
.tabs__b.is-on::after { content: ''; position: absolute; left: 1.1rem; right: 1.1rem; bottom: -1px; height: 2px; background: var(--amber); }
.pane { padding-top: 1.4rem; }

.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.tools__chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  --ev: var(--ink);
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0 0.9rem;
  font-family: var(--f-ui); font-weight: 500; font-size: 0.98rem;
  color: var(--ink-2);
  border: 1px solid var(--rule-2); border-radius: 0.3rem;
}
.chip::before { content: ''; width: 2.7rem; height: 1.9rem; margin-left: -0.55rem; background: var(--thumb, var(--amber)) var(--thumb-pos, center) / cover; border-radius: 2px; }
.chip[data-f="all"]::before { width: 0.55rem; height: 0.55rem; margin-left: 0; }
.chip:hover { color: var(--ink); }
.chip.is-on { color: var(--ground); background: var(--ink); border-color: var(--ink); }
.search input {
  width: 17rem; min-height: 44px; padding: 0 0.9rem;
  font-size: 16px; color: var(--ink);
  background: var(--ground-2); border: 1px solid var(--rule-2); border-radius: 0.3rem;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--amber); outline: none; }

/* ------------------------------------------------ таблиці */
.tbl-wrap { border: 1px solid var(--rule); border-radius: 0.3rem; overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tbl th, .tbl td { padding: 0.75rem 0.9rem; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl thead th { font-family: var(--f-ui); font-weight: 400; font-size: 0.88rem; color: var(--ink-3); background: var(--ground-2); }
.tbl tbody tr:hover { background: rgba(246, 246, 244, 0.025); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; }
.tnum { font-variant-numeric: tabular-nums; }
.tbl td small { color: var(--ink-3); font-size: 0.8rem; }
.t-co { font-weight: 600; }
.evtag { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.evtag::before { content: none; }
.pill {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 0.7rem;
  font-family: var(--f-ui); font-size: 0.9rem;
  border-radius: 0.3rem; border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
button.pill { cursor: pointer; }
button.pill:hover { border-color: var(--ink-3); }
.pill--paid { background: rgba(245, 179, 31, 0.14); color: var(--amber); }
.pill--invoice { background: rgba(246, 246, 244, 0.08); color: var(--ink); }
.pill--new { border-color: var(--rule-2); color: var(--ink-2); }
.pill--static { cursor: default; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--ink-2); }
.dots { display: inline-flex; align-items: center; gap: 3px; }
.dots i { width: 0.7rem; height: 0.7rem; border-radius: 1px; background: rgba(246, 246, 244, 0.08); }
.dots i.on { background: var(--ev); }
.dots small { margin-left: 0.45rem; }

/* ------------------------------------------------ стенди */
.seg { display: grid; grid-template-columns: repeat(3, auto); gap: 2px; background: #0a0909; border-radius: 0.3rem; overflow: hidden; }
.seg__b { min-height: 44px; padding: 0 1rem; font-family: var(--f-ui); font-size: 1rem; color: var(--ink-2); background: var(--ground-3); }
.seg__b:hover { color: var(--ink); }
.seg__b.is-on { background: var(--ink); color: var(--ground); }
.legend { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--ink-2); }
.lg { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 2px; margin-left: 0.6rem; }
.lg--b { background: var(--amber); }
.lg--r { border: 1.5px solid var(--amber); }
.lg--f { background: rgba(246, 246, 244, 0.07); }
.stands { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.5rem; align-items: start; }
.stands__map {
  display: grid;
  grid-template-columns: repeat(var(--cols, 11), minmax(0, 1fr));
  gap: 6px;
  padding: 1.2rem;
  background: var(--ground-2);
  border: 1px solid var(--rule);
  border-radius: 0.3rem;
}
.stand {
  position: relative;
  aspect-ratio: 1.25;
  min-height: 32px;
  display: grid; place-items: center;
  font-family: var(--f-ui); font-size: 0.72rem;
  border-radius: 2px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.stand--b { background: var(--amber); color: var(--amber-ink); }
.stand--r { border: 1.5px solid var(--amber); color: var(--amber); }
.stand--f { background: rgba(246, 246, 244, 0.06); color: var(--ink-3); }
.stand:hover { transform: translateY(-1px); box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.4); }
.stand.is-sel { outline: 2px solid var(--ink); outline-offset: 2px; }
.stands__info { padding: 1.3rem; background: var(--ground-2); border: 1px solid var(--rule); border-radius: 0.3rem; }
.stands__k { font-family: var(--f-ui); font-size: 0.9rem; color: var(--ink-3); }
.stands__occ { display: flex; align-items: baseline; gap: 0.3rem; margin-top: 0.5rem; }
.stands__occ .led { font-size: 3.6rem; letter-spacing: 0.04em; }
.stands__occ > span:last-child { font-family: var(--f-ui); font-size: 1.6rem; color: var(--amber); }
.stands__sum { margin-top: 0.4rem; font-size: 0.92rem; color: var(--ink-2); }
.stands__sel { margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); }
.stands__name { margin-top: 0.4rem; font-family: var(--f-head); font-weight: 700; font-size: 1.45rem; line-height: 1.1; }
.stands__act { margin-top: 1rem; width: 100%; }

.afoot {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem;
  padding: 1.4rem 1.8rem;
  border-top: 1px solid var(--rule);
  font-size: 0.86rem; color: var(--ink-3);
}
.afoot a { color: var(--ink-2); }

/* ------------------------------------------------ адаптив */
@media (max-width: 1180px) {
  .abar__season, .abar__user { display: none; }
  .abar__site { margin-left: auto; }
  .kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board__row { grid-template-columns: minmax(9rem, 1.3fr) 6.5rem minmax(7rem, 1fr) minmax(8rem, 1.2fr) minmax(7rem, 1fr) 7rem; gap: 1rem; }
  .stands { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .abar { height: auto; flex-wrap: wrap; gap: 0.5rem 0.9rem; padding: 0.7rem 1rem; }
  .abar__title { padding-left: 0.8rem; font-size: 1rem; }
  .abar__demo { order: 3; }
  .abar__site { order: 2; margin-left: auto; }
  .adm { padding: 1.1rem 1rem 2.4rem; }
  .kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi__c:last-child { grid-column: 1 / -1; }
  .kpi__v .led { font-size: 2rem; }
  .board__row--head { display: none; }
  .board__row { grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem 1rem; padding: 1rem 0; }
  .board__row > :nth-child(3), .board__row > :nth-child(4), .board__row > :nth-child(5) { grid-column: 1 / -1; }
  .board__row > :nth-child(6) { grid-column: 1 / -1; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tools { flex-direction: column; align-items: stretch; }
  .search input { width: 100%; }
  .tbl-wrap { border: 0; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; margin-bottom: 0.8rem; padding: 0.9rem 1rem; background: var(--ground-2); border: 1px solid var(--rule); border-radius: 0.3rem; }
  .tbl td { display: block; width: auto; padding: 0; border: 0; text-align: left; }
  .tbl td::before { content: attr(data-l); display: block; margin-bottom: 0.15rem; font-family: var(--f-ui); font-size: 0.8rem; color: var(--ink-3); }
  .tbl td.t-co { grid-column: 1 / -1; font-size: 1.05rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--rule); }
  .tbl .num { text-align: left; }
  .seg { grid-template-columns: 1fr; width: 100%; }
  .legend { flex-wrap: wrap; }
  .stands__map { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; padding: 0.7rem; }
  .stand { min-height: 44px; font-size: 0.78rem; }
}
