/* The dashboard shell and the live board, on top of the report's colours and parts. */
[hidden] { display: none !important; }

/* ----- shell ------------------------------------------------------------- */
body.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--nav); color: var(--nav-ink); padding: 18px 12px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
.mark { width: 28px; height: 28px; flex: none; fill: #5b9ee8; }
.mark .open { fill: none; stroke: #5b9ee8; stroke-width: 1.8; }
.brand h1 { font-size: 15px; margin: 0; color: #fff; }
.server { display: block; font-size: 12px; color: var(--nav-muted); overflow-wrap: anywhere; }
.tabs { display: flex; flex-direction: column; gap: 2px; }
.tabs button { all: unset; display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 8px 10px; border-radius: 6px; color: var(--nav-muted); font-weight: 500;
  white-space: nowrap; }
.tabs button:hover { color: var(--nav-ink); background: color-mix(in srgb, var(--nav-active) 55%, transparent); }
.tabs button[aria-selected="true"] { color: #fff; background: var(--nav-active); }
.tabs button:focus-visible { outline: 2px solid #8cc0ff; outline-offset: -2px; }
.icon { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; padding: 16px 8px 0; font-size: 12px; color: var(--nav-muted); }
.side-foot p { margin: 12px 0 0; line-height: 1.45; }
.account { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.account .person { color: var(--nav-ink); font-weight: 500; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.account a { color: #8cc0ff; text-decoration: none; }
.account a:hover { text-decoration: underline; }
.connection { display: inline-flex; align-items: center; gap: 8px; color: var(--nav-ink);
  font-weight: 500; font-size: 13px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--neutral); }
.online .pulse { background: #35c47c; box-shadow: 0 0 0 3px rgba(53, 196, 124, .2); }
.degraded .pulse { background: #f0b23c; }
.offline .pulse { background: #ef6a6a; }

.content { min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding: 16px 28px; background: var(--surface);
  border-bottom: 1px solid var(--ring); }
.page-head h2 { font-size: 20px; margin: 0; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar select, .button { height: 34px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--axis); border-radius: 6px;
  padding: 0 12px; font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; }
.toolbar select:hover, .button:hover { background: var(--surface-2); border-color: var(--series); }
main { padding: 22px 28px 48px; max-width: 1480px; }
#view > section > h2:first-child { margin-top: 0; }
#view > section + section { margin-top: 32px; }
/* The page heading already names these. */
#view > #summary > h2, #view > #overview > h2, #view > #features > h2, #view > #shortages > h2,
#view > #users > h2 { display: none; }
#view > #overview > h3:first-of-type { margin-top: 12px; }
.notice { border: 1px solid var(--warning); border-radius: 8px; padding: 10px 14px;
  background: var(--warning-wash); margin: 0 0 14px; }

/* ----- live board -------------------------------------------------------- */
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px;
  align-items: start; margin-top: 18px; }
.board { min-width: 0; }
.slots-legend { gap: 6px 18px; margin: 0 0 10px; }
.slots-legend span { display: inline-flex; align-items: center; gap: 6px; }
.slots-legend i.slot { width: 11px; height: 14px; }
.group { background: var(--surface); border: 1px solid var(--ring); border-radius: 10px;
  margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow); container-type: inline-size; }
.group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 12px; padding: 10px 18px; background: var(--surface-2);
  border-bottom: 1px solid var(--ring); }
.group-head h2 { font-size: 14px; margin: 0; }
.freshness { display: inline-flex; align-items: center; gap: 7px; font-size: 12px;
  color: var(--muted); }
.freshness i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.freshness.stale { color: var(--ink); }
.freshness.stale i { background: var(--warning); }
.licence { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(170px, 1fr) minmax(250px, 1.5fr);
  gap: 12px 22px; padding: 14px 18px; border-top: 1px solid var(--grid); }
.group-head + .licence { border-top: 0; }
.licence.quiet { padding-block: 9px; }
.quiet .count strong { font-size: 15px; color: var(--muted); }
.quiet .slots { margin-top: 5px; min-height: 12px; }
.quiet i.slot { height: 12px; }
.licence.full { box-shadow: inset 3px 0 0 var(--warning); }
.licence.short { box-shadow: inset 3px 0 0 var(--critical); background: var(--critical-wash); }
.lic-name h3 { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.lic-name p { display: flex; flex-wrap: wrap; gap: 0 12px; margin: 3px 0 0; font-size: 12px;
  color: var(--muted); }
.lic-name .bad { color: var(--critical); font-weight: 500; }
.count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.count strong { font-size: 20px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.state { font-size: 12px; color: var(--muted); }
.full .state { color: var(--ink); font-weight: 600; }
.short .state { color: var(--critical); font-weight: 600; }
.slots { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-top: 8px;
  min-height: 20px; }
/* Seats are <i> elements: the charts have a "slot" class of their own. */
i.slot { display: inline-block; width: 14px; height: 20px; border-radius: 3px; flex: none; }
i.slot.held { background: var(--series); }
i.slot.held.auto { background: repeating-linear-gradient(45deg, var(--series) 0 3px,
  var(--series-soft) 3px 5px); }
i.slot.free { border: 1.5px solid var(--axis); background: var(--surface-2); }
i.slot.waiting { border: 1.5px dashed var(--critical); background: transparent; }
i.slot.free + i.slot.waiting, i.slot.held + i.slot.waiting { margin-left: 6px; }
.over { font-size: 12px; font-weight: 600; color: var(--critical); margin-left: 3px; }
.seatbar { flex: 1 1 120px; height: 12px; border-radius: 3px; background: var(--track); }
.seatbar span { display: block; height: 100%; border-radius: 3px; background: var(--series); }
.lic-people { min-width: 0; }
.lic-people h4 { margin: 10px 0 2px; color: var(--critical); font-size: 12px; }
.people { list-style: none; padding: 0; margin: 0; max-height: 232px; overflow-y: auto; }
.people li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 11ch;
  gap: 0 12px; padding: 3px 0; font-size: 13px; }
.people li + li { border-top: 1px solid var(--grid); }
.people .who { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .where { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .for { grid-column: 3; grid-row: 1; font-variant-numeric: tabular-nums;
  white-space: nowrap; text-align: right; }
.people .tag { grid-column: 1 / -1; grid-row: 2; font-size: 11.5px; color: var(--muted); }
.people .more { display: block; color: var(--muted); }
.nobody, .idle { color: var(--muted); font-size: 13px; margin: 0; }
.idle { padding: 14px 18px; }
@container (max-width: 700px) {
  .licence { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lic-people { grid-column: 1 / -1; }
}
@container (max-width: 420px) {
  .licence { grid-template-columns: minmax(0, 1fr); }
}

/* ----- activity ---------------------------------------------------------- */
.activity { background: var(--surface); border: 1px solid var(--ring); border-radius: 10px;
  overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 16px; }
.activity h2 { font-size: 14px; margin: 0; padding: 10px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--ring); }
.activity .scroll { max-height: calc(100vh - 90px); }
.activity > .scroll > p { padding: 0 16px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed .day { padding: 8px 16px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.event { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 7px 16px;
  border-top: 1px solid var(--grid); font-size: 13px; }
.event time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
  padding-top: 1px; }
.event p { margin: 0; overflow-wrap: anywhere; }
.event .lic { font-weight: 500; }
.event .where { font-size: 12px; color: var(--muted); }
.event.in p:first-child { color: var(--ink-2); }
.event.denied, .event.expired { background: var(--critical-wash);
  box-shadow: inset 3px 0 0 var(--critical); }
.times { color: var(--critical); font-weight: 600; }

@media (max-width: 1180px) {
  .live-grid { grid-template-columns: minmax(0, 1fr); }
  .activity { position: static; }
  .activity .scroll { max-height: 420px; }
}

/* ----- narrow screens: the side bar becomes a top bar --------------------- */
@media (max-width: 820px) {
  body.app { display: block; }
  .sidebar { position: static; height: auto; padding: 12px 10px 8px; overflow: visible; }
  .brand { padding: 0 6px 10px; }
  .brand > div { flex: 1; min-width: 0; }
  .tabs { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .tabs button { padding: 7px 10px; }
  .tabs .icon { display: none; }
  .side-foot { margin: 0; padding: 8px 6px 0; }
  .side-foot p { display: none; }
  .side-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .account { order: 2; flex-direction: row; gap: 10px; margin: 0; min-width: 0; }
  .page-head { padding: 14px 16px; }
  main { padding: 16px 12px 40px; }
}
