:root {
  --sidebar: #06263a;
  --sidebar2: #06263a;
  --cyan: #0ea5d4;
  --cyan2: #087fac;
  --yellow: #d7e100;
  --paper: #e8edf0;
  --paper2: #f7f9fa;
  --grid: #b9c5cc;
  --text: #123043;
  --muted: #5d7483;
  --red: #e11d48;
  --ok: #00b956;
  --bad: #ff5d5d;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #d8dde0;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
}

button,
select {
  font: inherit;
}

.screen {
  display: grid;
  grid-template-columns: 88px 1fr;
  width: 100vw;
  height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  min-width: 88px;
  padding: 42px 5px 10px;
  color: #fff;
  background: var(--sidebar);
  border-right: 3px solid var(--yellow);
}

.brand {
  display: grid;
  gap: 0;
  width: 78px;
  color: #fff;
  justify-items: center;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.05;
}

.brand span:first-child {
  display: inline-block;
  width: max-content;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.95);
}

.side-action {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: 78px;
  padding: 2px 1px;
  color: #fff;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  text-transform: lowercase;
}

.side-action:hover {
  background: rgba(255,255,255,0.08);
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 30px;
  height: 5px;
  background: #fff;
  content: "";
}

.hamburger {
  position: relative;
}

.hamburger::before {
  position: absolute;
  top: -10px;
}

.hamburger::after {
  position: absolute;
  top: 10px;
}

.side-spacer {
  flex: 1;
}

.connection-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bad);
}

.connection-dot.ok {
  background: var(--ok);
}

.connection-dot.bad {
  background: var(--bad);
}

.online-label {
  margin-bottom: -24px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.side-total {
  display: block;
  width: 78px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-total strong {
  color: #fff;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.side-menu {
  position: absolute;
  left: 88px;
  z-index: 30;
  width: 280px;
  max-height: 70vh;
  overflow: auto;
  color: #fff;
  background: rgba(5,42,61,0.98);
  border: 2px solid var(--yellow);
  box-shadow: 0 10px 24px rgba(0,0,0,0.32);
}

#raceMenu {
  top: 24px;
}

#splitMenu {
  top: 152px;
}

.hidden {
  display: none !important;
}

.menu-title {
  padding: 8px 10px;
  background: #0b94c8;
  border-bottom: 1px solid rgba(255,255,255,0.22);
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
}

.menu-list {
  display: grid;
  gap: 1px;
  padding: 5px;
}

.menu-item {
  width: 100%;
  padding: 8px 9px;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 0;
  text-align: left;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.menu-item:hover,
.menu-item.active {
  background: #0b94c8;
}

.workspace {
  min-width: 0;
  height: 100vh;
  overflow: auto hidden;
  background: #dbe0e3;
}

.columns-board {
  display: flex;
  align-items: stretch;
  min-width: max-content;
  height: 100%;
  padding: 6px 0 0;
}

.split-column {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  flex: 0 0 var(--col-width, 300px);
  width: var(--col-width, 300px);
  min-width: 190px;
  max-width: 900px;
  height: calc(100vh - 6px);
  background: var(--paper);
  border-left: 3px solid var(--yellow);
  border-right: 1px solid #9aaab2;
  color: var(--text);
}

.column-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 7px;
  background: linear-gradient(180deg, #12a8dc, #078bc0);
}

.column-toolbar button {
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  padding: 0 7px;
  color: #fff;
  background: linear-gradient(180deg, #2fc3ef, #0783b2);
  border: 0;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.column-toolbar button:hover {
  filter: brightness(1.08);
}

.column-toolbar .close-btn {
  margin-left: auto;
}

.column-title {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 3px 7px 5px;
  color: #fff;
  background: #0b94c8;
  border-bottom: 2px solid var(--yellow);
}

.split-name {
  overflow: hidden;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.split-count,
.split-status {
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.split-body {
  min-height: 0;
  overflow: auto;
  background: var(--paper);
}

.result-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 14px;
  font-weight: 700;
}

.result-table th,
.result-table td {
  height: 22px;
  padding: 2px 5px;
  border-right: 1px solid var(--grid);
  border-bottom: 1px solid var(--grid);
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #fff;
  background: #0095c8;
  font-size: 12px;
  text-align: left;
}

.result-table tbody tr:nth-child(odd) {
  background: #f8fafb;
}

.result-table tbody tr:nth-child(even) {
  background: #e3e8eb;
}

.result-table td:nth-child(1),
.result-table td:nth-child(2),
.result-table td:nth-child(5),
.result-table td:nth-child(6),
.result-table td:nth-child(7),
.result-table th:nth-child(1),
.result-table th:nth-child(2),
.result-table th:nth-child(5),
.result-table th:nth-child(6),
.result-table th:nth-child(7) {
  text-align: center;
}

.result-table td:nth-child(3) {
  font-weight: 900;
}

.result-table td:nth-child(4) {
  color: #17445c;
  font-weight: 900;
}

.result-table td:nth-child(7) {
  color: #245f82;
}

.result-table .highlight {
  color: var(--red);
}

.empty-cell {
  padding: 20px 8px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 8;
  width: 8px;
  height: 100%;
  cursor: col-resize;
}

.resize-handle:hover {
  background: rgba(215,225,0,0.25);
}

@media (max-width: 900px) {
  .screen {
    grid-template-columns: 88px 1fr;
  }

  .sidebar {
    min-width: 88px;
  }

  .split-column {
    flex-basis: var(--col-width, 270px);
    width: var(--col-width, 270px);
  }
}
