.capacity-shell {
  width: min(1520px, 100%);
  display: grid;
  gap: 14px;
}

.capacity-board {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: auto;
  box-shadow: 0 18px 48px rgba(23, 32, 27, 0.08);
}

.capacity-grid {
  --capacity-row-height: 20px;
  --capacity-column-width: 64px;
  min-width: 760px;
  display: grid;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.capacity-cell {
  position: relative;
  min-height: var(--capacity-row-height);
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.capacity-cell.header {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 42px;
  background: var(--surface-soft);
  color: var(--muted);
  text-transform: uppercase;
}

.capacity-cell.header strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.capacity-vehicle-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.capacity-vehicle-toggle input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.capacity-cell.vehicle-disabled {
  background: #f3f5f3;
  color: #a2aaa4;
}

.capacity-cell.header.vehicle-disabled {
  opacity: 0.58;
}

.capacity-cell.vehicle-disabled:not(.header) {
  background:
    repeating-linear-gradient(
      -45deg,
      #f5f6f5 0,
      #f5f6f5 7px,
      #ecefec 7px,
      #ecefec 8px
    );
}

.capacity-cell.header span {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
}

.capacity-cell.time {
  position: sticky;
  left: var(--capacity-column-width);
  z-index: 3;
  justify-content: end;
  align-content: center;
  padding-right: 8px;
  background: #f8faf8;
  color: var(--muted);
}

.capacity-cell.date {
  position: sticky;
  left: 0;
  z-index: 4;
  align-content: start;
  padding: 9px 6px 0;
  background: #f8faf8;
  color: var(--accent);
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.capacity-cell.time.hour {
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
}

.capacity-cell.time.hour-block {
  min-height: calc(var(--capacity-row-height) * 2);
}

.capacity-cell.day-start {
  border-top: 2px solid var(--accent);
}

.capacity-cell.occupied {
  background: #ffffff;
  color: #17201b;
}

.capacity-cell.overcapacity {
  background: #ffffff;
  color: #8d2424;
}

.capacity-cell.header.overcapacity {
  background: #f9e4e4;
}

.capacity-cell.trip-block::before {
  content: "";
  position: absolute;
  inset: 0 4px;
  z-index: 0;
  background: #d9dada;
}

.capacity-cell.overcapacity.trip-block::before {
  background: #f3d3d3;
}

.capacity-cell.trip-start::before,
.capacity-cell.trip-single::before {
  top: 3px;
  border-radius: 5px 5px 0 0;
}

.capacity-cell.trip-end::before,
.capacity-cell.trip-single::before {
  bottom: 3px;
  border-radius: 0 0 5px 5px;
}

.capacity-cell.trip-single::before {
  border-radius: 5px;
}

.capacity-cell.summary {
  font-weight: 500;
}

.capacity-cell.summary.empty {
  color: transparent;
}

.capacity-cell.summary.green {
  background: #55b63a;
  color: #12210f;
}

.capacity-cell.summary.yellow {
  background: #ffc400;
  color: #211b00;
}

.capacity-cell.summary.red {
  background: #ff1f1f;
  color: #ffffff;
}

.capacity-cell.alert {
  justify-content: start;
  padding: 0 10px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.capacity-cell.alert.sedan {
  color: #9c6a00;
}

.capacity-cell.alert.van {
  color: var(--danger);
}

.capacity-cell.alert.overloaded {
  color: #ffffff;
  background: #a03333;
  font-weight: 900;
}

@media (max-width: 900px) {
  .capacity-grid {
    --capacity-column-width: 58px;
    min-width: 750px;
  }

}
